Copying a transparent gif to the clipboard

mark007

Well-known member
Joined
Jan 22, 2005
Messages
182
Location
York, UK
I have a picturebox on a form that displays a transparent gif all fine and well. I wish to copy this to the clipboard so I can paste it elsewhere. Unfortunately using the following:

System.Windows.Forms.Clipboard.SetDataObject(f.PictureBox2.Image)

Replaces the transparency with a dark blue.

Any ideas on how I can achieve this?

:)
 
Will you be pasting it onto another vb.net application? If so you could do something like this
Code:
bitmap1.MakeTransparent(color.blue)
 
Its to be pasted as an icon on a toolbar in Excel. Thanks for the thoughts though... will see if it that can help at all.
The whole code is something like:

System.Windows.Forms.Clipboard.SetDataObject(f.PictureBox2.Image)
b.PasteFace

Where b is an Office CommandbarButton.
 
Back
Top