Results 1 to 3 of 3

Thread: not always on top, how?

  1. #1

    Thread Starter
    Addicted Member Eric_B's Avatar
    Join Date
    May 2001
    Location
    home sweet home
    Posts
    130

    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!

  2. #2
    Matthew Gates
    Guest
    I believe the constant value for not always on top is -2.
    For topmost, it's -1, for nottopmost, it's -2.

  3. #3
    Topmost ZOrder is 0, lowest is 1. (See the VB help.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width