how to insert a transparent image in a richtextbox

  • Thread starter Thread starter Pedro Cardoso
  • Start date Start date
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?
 
Back
Top