-
not always on top, how?
My program has an icon in the tray. I want to make it so that when a user try to open it from the system tray it comes on top of other forms.
I used SetWindowPos [Private Const HWND_TOP = 0] and BringWindowToTop but they only work when my program has the focus. If some other program has the focus they don't bring the form on top.
Private Const HWND_TOPMOST = -1 brings the form on top if some other program has the focus but it keeps the form always on top.
I want to make something like the msnIM when the user clicks open in the system tray icon menu it brings the IM window to top even if some other program has the focus.
Last question, i used the tray icon example from allapi.com but the the menu stays open if someother program is clicked.
How do i fix that?
thanx in advance!
-
I believe the constant value for not always on top is -2.
For topmost, it's -1, for nottopmost, it's -2.
-
Topmost ZOrder is 0, lowest is 1. (See the VB help.)