Modeless child form and main window focus 
Author Message
 Modeless child form and main window focus

In my app, I have a find/replace window that I show using:

    Me.Show vbModeless, frmMain

This is done from frmFindReplace in a routine called ShowWindow.  frmMain is
an MDIForm and frmFindReplace is a normal Form with ShowInTaskbar set to
False and the BorderStyle set to 3 - Fixed Dialog.  This works just fine in
that the find/replace dialog is shown modelessly, but always stays in front
of the main window.  The only thing is, when you set the focus to the
find/replace window, the main window loses focus (as desired) but the
taskbar button is also deselected indicating the app lost focus, when it
hasn't (not as desired).  If you try this in Notepad and other apps, the
taskbar button stays selected even though the main window has lost focus.
Does anyone know how to reproduce this in VB?  I've tried other styles of
borders for frmFindReplace, and switching frmMain with a normal Form, but
nothing I've tried makes any difference.

- Doug

Fri, 12 Nov 2004 22:32:12 GMT  
 [ 1 post ] 

 Relevant Pages 

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

2. maximize child form display multiple tool box controls on main form

3. How to switch focus from a modeless form to the document

4. MDI-Child modeless form on top !

5. MDI Form & Child Form Focus

6. How to open CR as MDI child in Main window

7. Making Copy Of a MDI Main Form Menu for Child

8. Starting Child from from MDI Main form.

9. Why main form lost focus?

10. Main form loses focus

11. Losing Focus on main Form

12. Unhandled exception in (in my main form) - argh


Powered by phpBB® Forum Software