J
Just Me
Dim iData As IDataObject = Clipboard.GetDataObject()
Dim img As System.Drawing.Bitmap
img = img.FromFile(ofd.FileName, True)
Clipboard.SetDataObject(img)
TextControl1.Paste()
img.Dispose() : img = Nothing
Clipboard.SetDataObject(iData)
I want to insert an image and tried the above.
I wanted to not disturb the clipboard and didn't know how to do that so I
tried the first and last statements above. They produce an error.
Can someone tell how to preserve the clipboard contents?
Thanks
Dim img As System.Drawing.Bitmap
img = img.FromFile(ofd.FileName, True)
Clipboard.SetDataObject(img)
TextControl1.Paste()
img.Dispose() : img = Nothing
Clipboard.SetDataObject(iData)
I want to insert an image and tried the above.
I wanted to not disturb the clipboard and didn't know how to do that so I
tried the first and last statements above. They produce an error.
Can someone tell how to preserve the clipboard contents?
Thanks