Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TransparencyKey with VB.NET 2005

Status
Not open for further replies.

tyreejp

Programmer
Apr 20, 2005
114
US
I'm using the following code to use an embedded image and set it as the background of my form. I'm also programatically setting the TransparencyKey so some of the form will be transparent. The end result should show a form that I've drawn to the user in place of the standard squared off form.

This code works perfect in 2003, but in 2005, the color that I want to be transparant is transparent, but then I see the Grey background that is the BackColor of the form itself.

Dim tmpBMP As New Bitmap(executing_assembly.GetManifestResourceStream(my_namespace + ".NewProgress.gif"))
tmpBMP.MakeTransparent(tmpBMP.GetPixel(1, 1))
Me.BackgroundImage = tmpBMP
Me.TransparencyKey = tmpBMP.GetPixel(1, 1)


Any suggestions would be greatly appreciated!

--
James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top