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...
MS Dev MVP
> How can I go about placing a form in a MDI project that will always
> on top of all other visible forms? Should this "on top" form be a MDI
> or no? Do I need to access any DLL's for this function?