|
How to change the dullness of a form
|
|
Current Rating:
0%
Total Members Rated:
0 |
 |
How to change the dullness of a form Here we get an application makes us to change the dullness of a form on run. Suppose you want to create cool effects on your function. The procedure is like this.
Begin by creating a Windows application, create two buttons named "cmdIncrse" and "cmdDecrese"
Here you get the main buttons of this little application and add a text box too, so we can see where we are on the scale. Create one text box and name it "txtCurrent".Make a double click on your button so you create an event automatically. When you got the first event, add the code:
this.Opacity = this.Opacity + 0.01;
To "cmdIncrse" now when we click this button the opacity will increase just a little.
Display the current opacity in the text box we do this by adding the code:
txtCurrent.Text = this.Opacity.ToString();
It changes the text box to whatever the opacity is at. We have to create another event. Go back to the design view and double click on the other button to perform it.
Add the code we just wrote and replace the "+" operator with "-".
Have a nice time!
|
|
|
Author is Offline
|