M
Michael Phillips, Jr.
Dim lMemoryStream As New MemoryStream
lImage.Save(lMemoryStream,
System.Drawing.Imaging.ImageFormat.Tiff)
Dim lDataObject As New DataObject
'rewind the stream to position 0
lDataObject.SetData("TIFF", False, lMemoryStream)
Clipboard.SetDataObject(lDataObject)
The above code works, if you make the change that I indicated.
In all cases(i.e., "PNG", "TIFF"), you must rewind the stream to position 0
before placing the stream in the DataObject.
lImage.Save(lMemoryStream,
System.Drawing.Imaging.ImageFormat.Tiff)
Dim lDataObject As New DataObject
'rewind the stream to position 0
lDataObject.SetData("TIFF", False, lMemoryStream)
Clipboard.SetDataObject(lDataObject)
The above code works, if you make the change that I indicated.
In all cases(i.e., "PNG", "TIFF"), you must rewind the stream to position 0
before placing the stream in the DataObject.