Hidden MDI form with Modal Login Form Problems 
Author Message
 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



Sun, 02 Nov 2003 06:41:57 GMT  
 Hidden MDI form with Modal Login Form Problems
Tom,

I don't understand why do you use modal login form here. Just make it non
MDI child and ShowInTaskBar=True. When user enters ID and password hide it
and show MDI form.

--
HTH,
Alexander Shirshov, MCSD


Quote:
> 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



Sun, 02 Nov 2003 16:12:40 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB3: modal form gets hidden by main MDI form in Win98

2. Modal non MDI forms and Modeless MDI child forms in VB 5.0

3. MDI Form problem- Child Forms hidden behind picture.

4. Some questions about MDI forms and modal forms

5. Problem with draw order after calling modal a modal from from a modal form

6. VB problem with Hiding a modal form

7. MDI Forms - want to HIDE initial form

8. Q: Form activate Fires On Non Child MDI Forms But Only Once On Child Mdi Forms

9. MDI child forms, hide/show/restore size problem

10. MODAL FORM & NON MODAL FORM

11. Unloading modal owner form also unloads modal form?

12. Modal Form with Modal form using Control?

 

 
Powered by phpBB® Forum Software