Allen,

$Form.WindowState changes the display characteristics of a defined window. $Form defines the window earlier in the code. Setting the value to 1 minimizes it and setting it to 0 returns it to a "normal" window. A value of 2 would maximize the window. Setting it to 1 and then 0 has the effect of bringing the window to the foreground and making it active.

It happens so fast that the minimize/restore operation just looks like the window popped to the foreground.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D