?
Solved

Displaying vb.net form near the system tray

Posted on 2009-04-07
3
Medium Priority
?
845 Views
Last Modified: 2012-05-06
Hello,

I am using the notify icon in my windows form. In the timer event, I display a small form. The form's startup position is set to Manual. But I want that this form to be displayed near the system tray just above my notify icon. This is just like what most anti-virus display a pop-up near the system tray. How do I accomplish this? Note I am using vb.net 3.5.

Regards,
MI
0
Comment
Question by:vj_mi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 48

Expert Comment

by:jpaulino
ID: 24089279
Hi,
You can do something like this:

        Dim frm As New Form
        frm.StartPosition = FormStartPosition.Manual
        frm.Left = Screen.GetWorkingArea(Me).Width - frm.Width
        frm.Top = Screen.GetWorkingArea(Me).Height - frm.Height
        frm.Show()

Open in new window

0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 24089769
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 24090946
If the TaskBar has been docked to the Top or the Left side of the Screen, then the TrayIcons will be in a different location (not bottom right).

    Docked to Top --> Tray in Top Right
    Docked to Left --> Tray in Bottom Left

(plus I'm not sure what happens when you have a Right-to-Left language in use!)

If you want to detect which edge the TaskBar is docked to then you would use the SHAppBarMessage() API with the ABM_GETTASKBARPOS message.

I use it here: http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21722899.html

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question