How can I insert a picture into a ritch Text box?
And Or
How copy a bitmap/pictureFile to the clipboard?
Printable View
How can I insert a picture into a ritch Text box?
And Or
How copy a bitmap/pictureFile to the clipboard?
Richtextbox1.Paste()
As for putting something in the clipboard, from where are you trying to get this picture?
CTRL+C ;)
I want to get the picture from a file.Quote:
Originally posted by Edneeis
Richtextbox1.Paste()
As for putting something in the clipboard, from where are you trying to get this picture?
CTRL+C ;)
Can you insert a picture into a Rich Text Box if it isn't on the clip board?
ex.
RichTextBox1.Insert("C:\test.bmp")
VB Code:
'get image object from file Dim img As Image = Image.FromFile("C:\windows\Soap Bubbles.bmp") 'set image in clipboard Clipboard.SetDataObject(img) 'paste into the rtb RichTextBox1.Paste()
You may want to write some code to preserve any items already in the clipboard if you want. Just store it as an object then set it again after the paste.
Thanks!