I was wondering how to change or modify the transparency of a Panel in C#, not the whole form, but the panel only.. I've seen many C# tutorials on Opacity, but its for the Form. im looking for how it could be possible with the Panel only. Thank You!
相关问题
- Generic Generics in Managed C++
- How to fix IE ClearType + jQuery opacity problem i
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
- Bulk update SQL Server C#
I just wanted to add to the William Smash solution as I couldn't get to his blog so answers which may have been in there to my simple questions could not be found.
Took me a while to realise, but maybe I was just having a moment...
If you haven't had to do so already you'll need to add a reference to System.Windows.Forms in the project properties.
Also you'll need to add
to the file where you're adding the override class.
For OnPaintBackground you'll need to add a reference for System.Drawing then
For whoever is still looking for a totally transparent panel, I found a nice solution in this blog by William Smash who in turn has taken it from Tobias Hertkorn on his T# blog. I thought its worth posting it as an answer here.
C# code:
VB.Net code:
some comments says that it works and some say it doesn't It works only for your
form
background not any othercontrols
behind