Opacity of Buttons/TextBoxes - VB.NET
22,971
There is no way to set the opacity of any control in WinForms. Only Forms have the opacity property. If you want to make any control appear semi-transparent, you'll have to implement the whole control from scratch and that will most likely involve drawing the control as an image onto its parent.
Your alternative is to use WPF, which allows setting the opacity of controls.
Author by
lab12
Updated on August 29, 2020Comments
-
lab12 over 3 years
Is it possible to set the opacity of a button or textbox? I know that you can set the opacity for a form, but I'm not so sure about a button or textbox.
-
lab12 over 14 yearsWHere is RGBA on Visual Basic 2008 ?
-
Victor Zakharov over 11 yearsThis approach does not work. Varying alpha (first parameter) does not make a difference. Tested on a button over a listbox.
-
Victor Zakharov over 11 yearsI think OP was referring to Winforms.
-
Victor Zakharov over 11 yearsOpacity is not the same as Transparency.
-
Dman over 8 yearsHe doesn't want it transparent, just change the opacity