Solved

Displaying vb.net form near the system tray

Posted on 2009-04-07
3
814 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
3 Comments
 
LVL 48

Expert Comment

by:jpaulino
Comment Utility
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 69

Accepted Solution

by:
Éric Moreau earned 500 total points
Comment Utility
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
Comment Utility
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now