I'm trying to make my main forms opacity 50% on the click event of my buttons but I can not do it. Would appreciate assistance.
Opacity of Form in VB.Net in Visual Studio 2005
Collapse
X
-
Tags: None
-
There should be a property of the form called Opacity. You can set this to a value between 0 and 1. 0 being invisible, 1 being opaque.
So, in your button click event handler:
Code:Me.Opacity = .5
-
exactly as insertalias said but if you want to set the original opacity back again after the buttons events were finished do something like...
Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Opacity = 0.5 'any code here necessary Me.Opacity = 1 End Sub
and it will make the form half transparent and when the button's events are finished returns the original opacity to the formComment
Comment