
Hidden MDI form with Modal Login Form Problems
I am writing an MDI application. Multiple users share the typical client
machine so I am providing a 'Log Out' option on the File menu. This will
allow the current user to walk away from the running app and force/allow the
next user to login without a length boot up process.
On the log out I am closing all of the MDI children (which fires each form's
QueryUnload event). Then I am hiding the MDI parent and loading a login form
modally.
The problem is that if any other app running on the machine is brought to
the foreground, the only way to get back to the login screen is to minimize
all apps that are on top of it. Clicking on its icon in the task bar shows
the login form but it does not respond (and the title bar is gray'd out).
The only way to get it back is to maximize another app and then minimize it.
On a hunch I added code to the Log In form's Activate event to minimize and
then immediately normalize the form. This fixes the problem in the VB IDE,
but the compiled app still has the problem.
Is there an API Window Message that I can send to bring my Log In screen to
the front and have it enabled?
Tom