Bitmap from Clipboard back to Clipboard as PNG?
- From: Joe Duchtel <duchtel@xxxxxxxxx>
- Date: Thu, 5 Jun 2008 06:00:17 -0700 (PDT)
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
.
- Follow-Ups:
- Re: Bitmap from Clipboard back to Clipboard as PNG?
- From: Michael Phillips, Jr.
- Re: Bitmap from Clipboard back to Clipboard as PNG?
- From: kimiraikkonen
- Re: Bitmap from Clipboard back to Clipboard as PNG?
- Prev by Date: Re: SaveFileDialog.ShowDialog() returns Cancel when Yes to overwrite ...
- Next by Date: Re: SaveFileDialog.ShowDialog() returns Cancel when Yes to overwrite ...
- Previous by thread: Inserting "triggers" into a vb.net app
- Next by thread: Re: Bitmap from Clipboard back to Clipboard as PNG?
- Index(es):
Relevant Pages
|