I have a single form window application now I want to change the form opacity
when application runs. Means when application run it will show low opacity
form and as time increse it will show complete form with 100 opacity
. So how to do that. (should I use timer control to control opacity, if yes then how????)
in constructor of the form you can write something like this.
this.Opacity = .1;
timer.Interval = new TimeSpan(0, 0, intervalinminutes);
timer.Tick += ChangeOpacity;
timer.Start();
And then define a method like this
void ChangeOpacity(object sender, EventArgs e)
{
this.Opacity += .10; //replace.10 with whatever you want
if(this.Opacity == 1)
timer.Stop();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With