J
Joe Duchtel
Hello -
I have the following code to get a bitmap from the clipboard and to
save it to a *.png file ...
Dim lData As IDataObject = Clipboard.GetDataObject()
If lData.GetDataPresent(DataFormats.Bitmap) Then
Dim lPictureBox As New PictureBox
lPictureBox.Image = lData.GetData(DataFormats.Bitmap,
True)
lPictureBox.Image.Save("Test.png",
System.Drawing.Imaging.ImageFormat.Png)
End If
How can I take the Image and put it back onto the Clipboard as a Png?
I found the Clipboard.SetDataObject() function but how can I use the
PictureBox or Image to convert it into a format that can be used by
SetDataObject()?
Thanks!
Joe
I have the following code to get a bitmap from the clipboard and to
save it to a *.png file ...
Dim lData As IDataObject = Clipboard.GetDataObject()
If lData.GetDataPresent(DataFormats.Bitmap) Then
Dim lPictureBox As New PictureBox
lPictureBox.Image = lData.GetData(DataFormats.Bitmap,
True)
lPictureBox.Image.Save("Test.png",
System.Drawing.Imaging.ImageFormat.Png)
End If
How can I take the Image and put it back onto the Clipboard as a Png?
I found the Clipboard.SetDataObject() function but how can I use the
PictureBox or Image to convert it into a format that can be used by
SetDataObject()?
Thanks!
Joe