Solved

Displaying vb.net form near the system tray

Posted on 2009-04-07
3
829 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 500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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 an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

737 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