Form fade out

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
    Form FormToFadeOut = (Form)sender;
    float Step = (float)(100f / 20);
    float Opacity = 100f;
 
    for (byte b = 0; b < 10; b++)
    {
        FormToFadeOut.Opacity = Opacity / 100;
        FormToFadeOut.Refresh();
        Opacity -= Step;
    }
}

Download this snippet

As the title says, fades out a form. Replace FormToFadeOut with the form name you want to fade out.

Twitter Twitter

1 Comments to “ Form fade out”

  1. Anonymous  on Mar 14, 2010

    UD6SRi <a href="http://hludxmtqfyto.com/">hludxmtqfyto</a>, [url=http://kxknjvaltkye.com/]kxknjvaltkye[/url], [link=http://srcsqztpvvfe.com/]srcsqztpvvfe[/link], http://iooyutzvvwrv.com/

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>