NotifyIcon.ShowBalloonTip() not working in Vista

T

Tim Mackey

hi,
i have a really simple win forms app that just has a notifyIcon, context
menu, and timer. no forms.
the problem is that the ShowBalloon method refuses to display anything in
Vista, although it works albeit inconsistently on a Server 2003 box. the
timer does tick every 5 sec but on my server it seemed to appear the first
time correctly and then it would miss a few of the 5 second intervals, and
maybe appear later on if it felt like it. can anyone explain this? the
repro is below. just to confirm that it never ever shows in Vista.
thanks / tim.

using System;
using System.Drawing;
using System.Windows.Forms;

namespace yo
{

public class Start
{
static NotifyIcon ni;
static ContextMenu cm;
static Timer t;

[STAThread]
static void Main(string[] args)
{
cm = new ContextMenu();
cm.MenuItems.Add("Exit", OnExitClick);

ni = new NotifyIcon();
ni.ContextMenu = cm;
ni.Icon = new Icon("App.ico"); // ico file must be in the run
directory...
ni.Visible = true;

t = new Timer();
t.Tick += new EventHandler(t_Tick);
t.Interval = 5000;
t.Enabled = true;
t.Start();

Application.Run();
}

static void t_Tick(object sender, EventArgs e)
{
ni.ShowBalloonTip(2000, "hello", "hello", ToolTipIcon.Info);
}

static void OnExitClick(object sender, EventArgs e)
{
ni.Visible = false;
Application.Exit();
}
}
}
 
L

Linda Liu[MSFT]

Hi Tim,

I create a WinForm application project in VS2005 and paste your sample code
into my project. Build the project and run the resulting executable on my
Vista machine. I see that the balloon tool tip appears on the taskbar every
5 seconds properly.

The OS version of my Vista machine is Windows Vista Enterprise.

Please perform a test on other Vista mchines to see if the problem still
exits.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
T

Tim Mackey

hi Linda.
thanks for the follow up. i'm using Ultimate 32 bit and don't have any
other vista installations to test on. since posting the email, i've done
more testing and found that the balloon may or may not appear, and if it
does, sporadically. i have very little confidence in this function now and
will probably resort to using a borderless form positioned in the bottom
corner instead.
seems a bit of a shame that it does not work consistently. a quick google
search shows many people with the same experience:
http://www.google.com/search?q=ShowBalloonTip+not+appearing
Tim
 
L

Linda Liu[MSFT]

Hi Tim,

Thank you for your prompt reply!

I searched in our internal database, but didn't find a similar issue in it.

Since the ShowBalloonTip method of the NotifyIcon component doesn't work
well on Ultimate version of Vista, I agree with you that using a borderless
form positioned in the buttom corner is a workaround.

If you have any question when you implement the workaround, please feel
free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top