-
Always On Top
Users can keep a VB app on top of the other apps/windows by clicking a menu. Clicking other menus & buttons residing on this app invoke other Forms. This is how I implemented the always on top feature:
Code:
Private Sub mnuAlwaysTop_Click()
If (mnuAlwaysTop.Checked = False) Then
mnuAlwaysTop.Checked = True
SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, Flags
Else
mnuAlwaysTop.Checked = False
SetWindowPos Me.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, Flags
End If
End Sub
But when Forms belonging to this app are invoked, even they get hidden behing the main app.
How do I ensure that when the app is always on top, the Forms that get invoked by clicking menus & buttons belonging to this app (i.e. Forms that are part & parcel of this VB app) do not get hidden behind the main app though other open apps/windows stay behind this VB app?
-
Re: Always On Top
If you have it set to always on top, then that is what it is going to be and all other forms will be behind it.
You would need to flip that off or perhaps minimize the window.
-
Re: Always On Top
Its doing exactly what you are telling it to do. You made the main form always on top and thats what its doing. If you want other forms to be always on top then when you click that menu to open on you will need to set that form as always on top.