Say I have 2 MDI child forms, A and B. Form A show first, then form B. So, form B is the most top than form A. Now how can I make form A on top than form B by command (without click on it) ?
FormA.SetFocus
Let me know if this helps
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
Call SetWindowPos(TheForm.hwnd, HWND_TOPMOST, 0&, 0&, 0&, 0&, 2 Or 1)
Public 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
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.