Always on top 
Author Message
 Always on top

How can I go about placing a form in a MDI project that will always remain
on top of all other visible forms?  Should this "on top" form be a MDI child
or no?  Do I need to access any DLL's for this function?

Pete



Sun, 22 Apr 2001 03:00:00 GMT  
 Always on top
Private Declare Function SetWindowLong& Lib "user32" Alias "SetWindowLongA"
(ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long)
Private Const GWL_HWNDPARENT& = (-8)

Sub Form_Load() 'this is in the on-top form
    Ret = SetWindowLong(Me.hwnd, GWL_HWNDPARENT, ParentForm.hwnd)

It should _not_ be an MDI Child form, IIRC...

Jim Deutch
MS Dev MVP



Quote:
> How can I go about placing a form in a MDI project that will always
remain
> on top of all other visible forms?  Should this "on top" form be a MDI
child
> or no?  Do I need to access any DLL's for this function?

> Pete



Mon, 23 Apr 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Always on top (ALWAYS)

2. Make a form always on top - always

3. Make a window always on top (of every window..always)

4. Keeping a Form Always On Top

5. VBA Form Always On Top

6. MsgBox Always On-Top

7. Always on TOP Property

8. Always on top application

9. Windows ALWAYS on top ...

10. Always on top

11. Form always on top

12. Form always on top

 

 
Powered by phpBB® Forum Software