Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Save image to sql.

$
0
0

The following code should work:

   declare image as type Byte occurs any
   declare o as object = type Clipboard::GetDataObject()::GetData("Bitmap");
   if o not = null
      set pictureBox1::SizeMode to type PictureBoxSizeMode::StretchImage
      set pictureBox1::Image to o as type Image
      perform using ms as type System.IO.MemoryStream = new System.IO.MemoryStream
        invoke pictureBox1::Image::Save(ms, type System.Drawing.Imaging.ImageFormat::Jpeg)
        set image to ms::ToArray
      end-perform
   end-if

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>