I started off with a VERY simple form and added a picturebox item to it. The code I was following used a procedure in the Form1.vb to override the transparent color of the image:
bmp was defined in the Form's "Load" section.Code:bmp.MakeTransparent(Color.Fuchsia)
Now things are different. I have more than 20 picturebox items now, each created in the Form1.Designer.vb code as follows:
The image is referenced from the resources. When I run the program, I'd like all these images to have their backgrounds transparent. None of these controls is currently referenced anywhere in the code at present.Code:Me.Tile020.Image = CType(resources.GetObject("Tile020.Image"), System.Drawing.Image) Me.Tile020.Location = New System.Drawing.Point(922, 297) Me.Tile020.Name = "Tile020" Me.Tile020.Size = New System.Drawing.Size(64, 64) Me.Tile020.TabIndex = 3 Me.Tile020.TabStop = False
What's the best way to get them to display transparently, other than recreating them as transparent .PNG's?




Reply With Quote