Hello
Here is a problem. I need to copy bmp or dib file to clipboard and then save it to disk. Put and get from clipboard, i know how to do this. But i dont`t know how to save picture to disk from clipboard.
Is it possible?
Printable View
Hello
Here is a problem. I need to copy bmp or dib file to clipboard and then save it to disk. Put and get from clipboard, i know how to do this. But i dont`t know how to save picture to disk from clipboard.
Is it possible?
Why don't you load it into a PictureBox, then save it?
Code:Picture1 = Clipboard.GetData(vbCFBitmap)
Savepicture Picture1, "MyFile.bmp"
Well just something you should do every time you access clipboard to avoid invalid property error when there's no picture.
Code:if clipboard.GetFormat(vbCFBitmap) then Savepicture Clipboard.GetData(vbCFBitmap),"temp.bmp"
Dim sFileName as string
sFileName = "C:\myfile.bmp"
SavePicture Clipboard.GetData(vbCFBitmap), sFileName