[VB2010] - the big question: can i put the usercontrol realy transparent?
i have code for put the usercontrol transparent. but stills be a false transparent. because the control is 'hided'(without an image) and you see what is on back, but you can't click on back controls:(
can anyone advice me, please?
(i can share the code... but isn't a real transparency:()
Re: [VB2010] - the big question: can i put the usercontrol realy transparent?
You have to show us a code sample, which is not hard. Copy/Paste into the reply and hit the # (code) tags. Or else add CODE \tags
Re: [VB2010] - the big question: can i put the usercontrol realy transparent?
Transparent means that you can see through it, not that you can click through it. Sounds like it may be working the way it should. It the control has nothing to display then you could move it to the background and bring the control you want to be clickable to the foreground.
If this is not what you are talking about then please explain in a bit more detail.
Re: [VB2010] - the big question: can i put the usercontrol realy transparent?
Quote:
Originally Posted by
DataMiser
Transparent means that you can see through it, not that you can click through it. Sounds like it may be working the way it should. It the control has nothing to display then you could move it to the background and bring the control you want to be clickable to the foreground.
If this is not what you are talking about then please explain in a bit more detail.
i'm sorry... for me Transparent is what you see thro(is right writed?) control and you can 'play' with other controls that are back;)
is what i need;)dglienna: heres my code(but doesn't work for what i need:(
Code:
Private Const WS_EX_TRANSPARENT As Int32 = &H20
Public Sub New()
MyBase.New()
InitializeComponent()
Me.SetStyle(ControlStyles.SupportsTransparentBackColor, True)
Me.UpdateStyles()
Me.BackColor = Color.Transparent
End Sub
Protected Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim cp As CreateParams = MyBase.CreateParams
cp.ExStyle = cp.ExStyle Or WS_EX_TRANSPARENT
Return cp
End Get
End Property
Protected Overrides Sub OnPaintBackground(ByVal e As PaintEventArgs)
'put the code here for draw an image(transparent or not)
End Sub
you can see thro the control, but it's a parent copy image:(
you can't use the controls that are on back:(
i need advice please
Re: [VB2010] - the big question: can i put the usercontrol realy transparent?
As I said Transparent means see through. You other assumption about being able to click controls that are behind it is just incorrect and has nothing to do with transparency.
You can shift the zorder of the controls to bring the one you want to use to the foreground or you can set the control in question to not be visible and then you can click on the control behind it but so long as your control is in front and has a visible setting of true then you can not click on anything that is behind it unless of course the control behind it is larger and you click on an area that is not covered up by the front control
Re: [VB2010] - the big question: can i put the usercontrol realy transparent?
Quote:
Originally Posted by
DataMiser
As I said Transparent means see through. You other assumption about being able to click controls that are behind it is just incorrect and has nothing to do with transparency.
You can shift the zorder of the controls to bring the one you want to use to the foreground or you can set the control in question to not be visible and then you can click on the control behind it but so long as your control is in front and has a visible setting of true then you can not click on anything that is behind it unless of course the control behind it is larger and you click on an area that is not covered up by the front control
so you mean that VB2010 Transparency is only for see through(thanks for the word... i'm portuguese) and not use the controls.
"You other assumption about being able to click controls that are behind it is just incorrect and has nothing to do with transparency." then tell me something for work. if isn't transparency, then what is?(in VB6 is more easy lol)
Re: [VB2010] - the big question: can i put the usercontrol realy transparent?
I did tell you already. You can change the order so that the control you want to click is the one in front or you can set the visible property to false on the control in front so it will not be blocking the one behind. It is the same in VB6 so not sure what you mean about it being easier in VB6.
you can always only click on the control that is in the front in either language.
Re: [VB2010] - the big question: can i put the usercontrol realy transparent?
Quote:
Originally Posted by
DataMiser
As I said Transparent means see through. You other assumption about being able to click controls that are behind it is just incorrect and has nothing to do with transparency.
Actually this is wrong. Take this code for example:
Code:
Me.TransparencyKey = Color.Fuchsia
Me.BackColor = Color.Fuchsia
Inside the main Form class, assign this code to a button click or something. Then while you can see through the form as the control's container, you can definitely click things "behind" this "transparent" object.