c# - TransparencyKey Property on Forms -
I would like to clear the background transparency of my form in a Windows Forms application with Visual C #.
I used
backclosure = color White; Transparency = Color White; Now I want to switch back to "not transparent". How can I do this? Just switching back to Beller, the elements of the form seem weird and it looks ugly. I think there is a way to reset the property.
How about storing previous values of backenders and transparency in local variables, and when you use non- -Traders want to return, so they should be restored? For example:
Private color _oldBG; Private color _oldTPKey; Private Zero MakeTransparent () {_oldBG = BackColor; _oldTPKey = TransparencyKey; BackColor = Color White; Transparency = Color White; } Private Zero MakeNonTransparent () {BackColor = _oldBG; Transparency = _oldTPKey; }
Comments
Post a Comment