Is there any way you can test to see if a modal form is open before you minimize?
~~Bonnie
>I wrote a "idle" timer that minimizes my application after a certain time has passed. When the user attempts to "restore" the window, I trap the WM_WINDOWPOSCHANGING message in the WndProc event, then I display a login form. If they login again properly, I manually restore the form by changing the WindowState to Normal.
>
>Here is my problem, if there was a MODAL form open at the time of minimize, when I restore the main application form, the MODAL form does not restore. It stay hidden, but still loaded in memory. I tried to make VISIBLE = TRUE, but the problem is that the form is no longer MODAL.
>
>Any suggestions?