Re: Are you ever going to make objects have a transparency option?
I could see a variation of this as being an improvement in the background property of groupboxes or pictureboxes. Simply setting the property to Transparent only makes it inherit the parent container color and not be an actual "transparency". If you have a form with a backgroud image and a label above it, the labels Background color property of Transparent will only color the label as Control color and not allow the image that the label covers show through.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Re: Are you ever going to make objects have a transparency option?
I assumed this kind of thing would be an option with the VS2008 controls what with Vista and its Aero Glass stuff coming out before VS2008....but unfortunately not
Re: Are you ever going to make objects have a transparency option?
I'm curious as to why you would even want a button to be transparent? That seems like a big usability issue and annoyance to me though I guess there could be some application for it.
KrisSiegel.com - My Personal Website with my blog and portfolio Don't Forget to Rate Posts!
Re: Are you ever going to make objects have a transparency option?
Thanks - I've been passing this specific feedback on to the Windows Forms and Client teams.
There's a trick you can use that will get you part of the way - setting alpha transparency on the background color. This works with Labels, Panels, and similar containers. It is not compatible with BackGroundImage settings or PictureBox -- you'd need to put the image behind the partially transparent panel on another control or on the form. Using this you can arrive at a glassy look.
Please try this trick and let me know what you think. If you like it I could show you how to combine it with an extender property so it shows up off of controls (much like Tooltips).
SetTransparency(Me.Panel1, 50)
'..
Public Sub SetTransparency(ByRef ctrl As Control, ByVal percentTransparent As Integer)
Dim alpha As Decimal = percentTransparent / 100 * 255
Re: Are you ever going to make objects have a transparency option?
Sorry it took me so long to pull this together!
I'm attaching a sample project. The key parts are:
-TransparencyHelper.vb -- this is a component class (like tooltip) that you can trag onto a form to extend other controls with a Transparency property. I've implemented IExtenderProvider and set various attributes to show you how that works. Note, you can change "CanExtend" method to allow this property to show up on more container types.
-TestForm.vb - shows how to set properties at design-time and in code
Per above, transparency isn't the most reliable technology (e.g. different video cards work better with it than others) but you can use it at your own risk and have fun with it.