keeping child windows on top of a parent 
Author Message
 keeping child windows on top of a parent

Quote:
> Setting a window to
> be always on top is not the answer as it will be on top of other apps.
Any
> help gratefully received!

Use the GetActiveWindow API call in a timer event to see which window has
the current focus.  If it is not active, use HWND_NOTOPMOST with
SetWindowPos, else use HWND_TOPMOST.

Chris Schram



Sun, 12 Dec 1999 03:00:00 GMT  
 keeping child windows on top of a parent

Quote:

> Hi Folks,

> I have an SDI application with one main form and a number of subsidary
> forms which are displayed from time to time. Does anyone know how to
> arrange it so that the subsidary windows are always on top of the main form
> but not nescessarily on top of any other application. Setting a window to
> be always on top is not the answer as it will be on top of other apps. Any
> help gratefully received!
> --
> Richard Martin, BP Research & Engineering

Try this:

Declare Sub SetWindowWord Lib "User" (ByVal hwnd%, ByVal nCmd%, ByVal
nVal%)
Global Const SWW_HPARENT = -8

Call SetWindowword(frmSub.hWnd, SWW_HPARENT, frmMain.hWnd)

        - Chris Kyarsgaard

--
+----------------------------------------------------------------+
| Geronimo Development Corporation    Phone: (800)457-6045       |
| 606 25th Ave. S., Suite 206          Fax: (320)259-9808        |
| St. Cloud, MN  56301            WWW: http://www.casefinder.com |
+----------------------------------------------------------------+



Sun, 12 Dec 1999 03:00:00 GMT  
 keeping child windows on top of a parent

Rich just use the following in VB:

If your subsiduary forms are called e.g. form2 and form3 then use

Form2.Show 1
Form3.Show 1

Putting the 1 after the show call makes the child window modal to the apps
main window but not to any other app.

OK.
Jeff



Quote:
> Hi Folks,

> I have an SDI application with one main form and a number of subsidary
> forms which are displayed from time to time. Does anyone know how to
> arrange it so that the subsidary windows are always on top of the main

form


Mon, 13 Dec 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Move activex dll child on a MDI parent parent window

2. Keeping a form on top of an MDI-parent

3. Keeping dialog box on top and accessing the parent form

4. Updating parent window and closing child window

5. Updating parent window and closing child window

6. Making a child window much bigger than its parent MDI window

7. Making a child window MUCH bigger than its parent MDI window

8. Closing Parent Window when the child window closes

9. Keep child form on top (non-modal)

10. Keep child form on top (non-modal)

11. Keep MDI child on top

12. How to keep MDI Child always on top

 

 
Powered by phpBB® Forum Software