Results 1 to 2 of 2

Thread: How to keep an MDI Child on top...

  1. #1

    Thread Starter
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205

    Question How to keep an MDI Child on top...

    How do I keep an MDI_Child Form on top of all other child forms?

    Just like a toolbox - I need to keep my 'toolboxes' on top at all times.

    I have used the API 'SetWindowPos' function, but when another form is clicked, the toolbars go to the back.

    I also need this to work only if the toolbars have been loaded and are visible in the first place.

    Help???

    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  2. #2
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919
    VB Code:
    1. 'module
    2. Declare Function SetWindowPos Lib "user32" (ByVal hwnd As _
    3. Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y _
    4. As Long, ByVal cx As Long, ByVal cy As Long, ByVal _
    5. wFlags As Long) As Long
    6.     Global Const conHwndTopmost = -1
    7.     Global Const conSwpNoActivate = &H10
    8.     Global Const conSwpShowWindow = &H40
    9.  
    10.  
    11.  
    12. 'code for on top
    13. hwnd=mdichild.hwnd
    14. SetWindowPos hwnd, conHwndTopmost, 100, 100, 400, 141, conSwpNoActivate Or conSwpShowWindow
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width