Hi all,
My problem is this, is it possible to set the background colour of the form within a user control to transparent as there is on opacity property and the TransparentKey function doesn't work. Can anyone help.
Thanks In Advance
ICE32 - "Lee"
Printable View
Hi all,
My problem is this, is it possible to set the background colour of the form within a user control to transparent as there is on opacity property and the TransparentKey function doesn't work. Can anyone help.
Thanks In Advance
ICE32 - "Lee"
Instead of trying to explain it, take a look at the comments i have in my sample app:VB Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Set the Form.TransparencyKey property to the same as the colour you want to disappear. 'This tells the form not to paint any pixels that match the color of the TransparencyKey. 'The BackgroundImage property of the form is set to a Bitmap with a colour you want removed. 'Then the TransparencyKey property is set to the same colour (ie: Color.Lime), then all the pixels in the bitmap 'that are Lime ( RGB(255,0,0)) will be transparent. End Sub
The thing is that this method doesn't work with a user control, there is not TransparentKey property.
Any other solution would be great
Thanks In Advance
Lee
By user control do you mean a control such as a label? :confused:
There is a transparentcy aspect with controls:
VB Code:
Private Sub btnMakeTransparent_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMakeTransparent.Click 'This can be set in the properties window by selecting the Web tab of the backColor property lblMakeTransparent.BackColor = System.Drawing.Color.Transparent End Sub
No i mean a user control as in when you go to the project option on the menu and select Add User Control. The web transparence doesn't work either.
the user control is
system.windows.forms.usercontrol
Hope this information helps
lee
ooooooh. That. Yeah,... my bad. You're trying to make a new control.
I've never tried that. I suspect there must be a way, but i've never seen it. Maybe someone else has seen how to do this?
Anyone? ........... :confused:
Ok thanks for your attempt. If there is anyone out there that can help please do.
thanks In Advance
Lee