N
NickP
Hi there,
I have a usercontrol that inherits from Windows.Forms.Button.
In the OnCreateControl method I set the style of the control so that it supports transparent backcolor and set the background color to transparent.
.....
Protected Overrides Sub OnCreateControl()
MyBase.OnCreateControl()
Call SetStyle(ControlStyles.SupportsTransparentBackColor, True)
BackColor = Color.Transparent
End Sub
.....
I have an image with magenta sections which I remove using Bitmap.MakeTransparent(Color.Magenta). Unfortunately when I draw this image onto the form the parts that were previously magenta, get drawn as black.
My question is, how do I draw this image with the magenta parts as transparent?
Many thanks in advance.
Nick.
I have a usercontrol that inherits from Windows.Forms.Button.
In the OnCreateControl method I set the style of the control so that it supports transparent backcolor and set the background color to transparent.
.....
Protected Overrides Sub OnCreateControl()
MyBase.OnCreateControl()
Call SetStyle(ControlStyles.SupportsTransparentBackColor, True)
BackColor = Color.Transparent
End Sub
.....
I have an image with magenta sections which I remove using Bitmap.MakeTransparent(Color.Magenta). Unfortunately when I draw this image onto the form the parts that were previously magenta, get drawn as black.
My question is, how do I draw this image with the magenta parts as transparent?
Many thanks in advance.
Nick.