Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

postioning a form relative to notifyicon

Back to Forum: Tech Off
  • User profile image
    agarwaga

    I want a form to be positioned(it should look like a tooltip) close to notifyicon of my application . Whenever i go over notifyicon this form should be displayed like a tooltip.  I am  using this in place of Text property of NotifyIcon   because this  has  a limit of 64 chars and i want to show many more. I am not able to position my form relative to the notifyicon. Kindly give some ideas ..

  • User profile image
    Eric Falsken

    Get the current mouse position and start-bar height. Then position relative to that.

  • User profile image
    Bugslayer

    this is very hard to do...

    you have to capture your icon's position... that's a given.

    you need to determine which edge of the screen the taskbar is docked to.

    You need to handle the auto-hide case.

    you need to handle the message broadcast by explorer.exe when it restarts (after a crash or explorer is term'ed and restarted.) because your icon will move.

    You can see that many ISVs opt to just slide in the form from an edge (think FW notifications and AV products).  If your tray icon is also on the form, the user gets the association.

    [Note: I made an app that allowed you to drag and drop tray icons into subrtrays to eliminate clutter and annoying "hyperactive" icons (that blink incessantly).  the subtrays would reveal themselves when you hovered over their "dot" on the taskbar.]

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.