API's quite frankly are confusing to me and are pretty much like magic in how they work to me. Anyhow, I've managed to use one to designate an access form as the top-most window; this one is strait from microsoft:
Code:
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, _
ByVal hWndInsertAfter As Long, _
ByVal X As Long, _
ByVal y As Long, _
ByVal cx As Long, _
ByVal cy As Long, _
ByVal wFlags As Long) As Long
Global Const HWND_TOPMOST = -1
Global Const SWP_NOSIZE = &H1
Global Const SWP_NOMOVE = &H2
Function TopMost(F As Form)
Call SetWindowPos(F.hwnd, HWND_TOPMOST, 0, 0, 0, 0, _
SWP_NOMOVE Or SWP_NOSIZE)
End Function
[end code]
then you just pass whichever form you want to designate on the event you want.
The question is, if this is topmost, and there is another program I want it to always be on top of, how do i make that program second-topmost so when I move or access that form, it always stays on top of the second app.
Much thanks
CN