To fade out forms in and out, I usually do this:
for(double opacity = 0.0; opacity <= 1.0; opacity += 0.2) { DateTime start = DateTime.Now; this.Opacity = opacity; while(DateTime.Now.Subtract(start).TotalMilliseconds <= 30.0) { Application.DoEvents(); } }
This is a nice, easy solution if you do it very rarely. Otherwise, I would recommend using streams.
source share