how to insert an image in a richtextbox

toostage

Member
Joined
Apr 26, 2006
Messages
12
Programming Experience
1-3
i would like a button in my form which gives the user an option to insert an image in the richtextbox. I've tried google without any good results. (only found some c# code) And msdn couldnt help me either.

for so far i've found this:

VB.NET:
[/COLOR][SIZE=2]
[/SIZE][COLOR=black][SIZE=2]Dim[/SIZE][SIZE=2] img [/SIZE][SIZE=2]As[/SIZE][/COLOR][SIZE=2][COLOR=black] System.Drawing.Bitmap[/COLOR]
[COLOR=black]img = img.FromFile("c:\test.bmp")[/COLOR]
[COLOR=black]img.[/COLOR]
[COLOR=black]Clipboard.SetDataObject(img)[/COLOR]
[COLOR=black][/COLOR][/SIZE][SIZE=2] 
[/SIZE][SIZE=2][COLOR=black]RichTextBoxPrintCtrl1.Paste()[/COLOR]
[/SIZE][SIZE=2][COLOR=black]
[/SIZE]

but thats a bit nasty codeing using clipboard


 
Last edited:
Back
Top