Solved

Displaying vb.net form near the system tray

Posted on 2009-04-07
3
824 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 85

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

Technology Partners: 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

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…

735 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