how to insert a transparent image in a richtextbox

P

Pedro Cardoso

hi,

i would like to add some smileys to a chat program and for that i
intend to use pictures just like msn messenger but the following code
doesnt preserve the transparency existant in the image file when the
image is inserted in the richtextbox even though the image has a
transparent background. instead that background is replaced by a blue
color


Dim img As System.Drawing.Bitmap
img = img.FromFile(Pasta & "Smilies\" & Filename & ".gif",
True)
Clipboard.SetDataObject(img)
RTF.ReadOnly = False
RTF.Paste()
RTF.ReadOnly = True
img.Dispose() : img = Nothing

can someone help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top