Balloon (System Tray) Events

Posted on 2006-04-03
Last Modified: 2012-05-05

I'd like to send certain events from my app to appear as bubble/balloon tips from the system tray.  I've seen a lot of documentation on this, including a really straightforward example from MS, but although the project compiles the balloons dont appear.  Could anyone give me a really simple example of a balloon notification, on minimize, or on.. any event?

- M

Question by:nikez2k4
    LVL 48

    Expert Comment

    heres one in
    LVL 48

    Accepted Solution


    Assisted Solution

    This is probably exactly what you are looking for...

    I use this myself, it works great!

    All you will need to do is wire the desired events. In my case, I want my window to vanish when minimized and run using the notifier above. To enable that kind of functionality, drag and configure a NotifyIcon into your project, this will be the icon displayed in the systray that represents your application. To make your application vanish when minimized (so that only the notify icon shows) wire this event

    private void Form1_Resize(object sender, System.EventArgs e)
          if (this.WindowState == FormWindowState.Minimized)
                // Resized because of a minimize

    I tried directly wiring the minimize event and it didn't work as well as connecting into the resize event above.

    You can also create a context menu to appear when your icon is right-clicked, which is handy if you want to redisplay your form. Simply create a normal menu in your application, then in the properties of the NotifyIcon, put the menu name in the ContextMenu field. I created a "Show Main Window" menu entry, the click event for which is:

    private void cxMenu_ShowMain_Click(object sender, System.EventArgs e)
          if (this.WindowState == FormWindowState.Normal)
                // Already in normal state, bring to front
                this.WindowState = FormWindowState.Normal;

    This will either restore the main window to the "front" application if it's already open, or un-minimize it if necessary. The Show() is required if you hid the window on minimize.
    LVL 1

    Author Comment

    Thanks for the links/comments.  I'm checking them out later today.
    dbtoth -- that code you pasted, is this code just to minimise the app to the system tray and hide from the taskbar? I cant see anything in there for Balloon (system tray) tips...

    - M

    Expert Comment

    The link at the top of the comment is to a full featured MSN'like pop up... I will whip you up some basic balloon code and post it today.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Article by: Najam
    Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
    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.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    779 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