I have (for fun) make a form in C#, with a trackbar.
I want to change the Opacity of the form with it, so I wrote this:
private void trackBar1_Scroll(object sender, EventArgs e)
{
progressBar1.Value = trackBar1.Value;
System.Windows.Forms.Form.ActiveForm.Opacity = trackBar1.Value;
label2.Text = trackBar1.Value.ToString();
}
When I start the program, the opacity will be 100% if the trackbar is in value 1 to 100, and if i drag the trackbar to 0, the form becomes fully transparant.
can you only get 100% Opacity or 0% Opacity when a form is started, or is what i want also possible?