private void FormAlphaTransparency_Load (
object sender,
System.EventArgs e)
{
// Set the form's initial opacity to 0 (100% transparent)
// and refresh the form.
this.Opacity = 0;
this.Refresh();
// We'll set the form's Opacity property. This property
// accepts values from 0 to 1, with 0 being fully transparent
for (double Opacity = 0; Opacity <= 1; Opacity += .05)
{
// Set the opacity to see the effect
this.Opacity = Opacity;
}
// Force completely opaque
this.Opacity = 1;
}
// Fade the form out of view on the Closing event
private void FormAlphaTransparency_Close (
object sender,
System.ComponentModel.CancelEventArgs e)
{
|