I try to show a balloon tip like the one in the screenshot:
First I created a notifyIcon
Then I added this code to the Form1_Load function:
private void Form1_Load(object sender, EventArgs e)
{
notifyIcon1.Visible = true;
notifyIcon1.Icon = SystemIcons.Exclamation;
notifyIcon1.BalloonTipTitle = "Balloon Tip Title";
notifyIcon1.BalloonTipText = "Balloon Tip Text.";
notifyIcon1.BalloonTipIcon = ToolTipIcon.Error;
notifyIcon1.ShowBalloonTip(10000);
}
All I get is a little icon, and If I hover over it then i see the name of the notify icon.
I also tried this notifyIcon1.ShowBalloonTip(10000, "Text", "Title", ToolTipIcon.Warning);
but then nothing happens.
I noticed in the function description of ShowBalloonTip
, that the parameter "timeout" is deprecated from windows vista on, so what should I do instead?
PS: I run it on windows 10 64bit.
UPDATE 1/3:
I just created a fresh project, the balloon tip does not show either. Maybe a setting in my OS blocks these messages?
UPDATE 2/3:
I downloaded the project from @pisi1001 but I get the same behaviour.
So I think it must be either a bug in windows 10, a wrong setting or group policy.
However like the next screenshots shows, the app is even allowed to show notifications:
UPDATE 3/3:
I noticed that you can even configure deeper if you double click on the setting, e.g. on "WindowsFormsApp1" from the last screenshot.
After I activated the setting in the red box in the last screenshot (which is basically saying "Show Notifications in the Info Center") I get at least notifications in the info center now:
This must be a Windows 10 Bug.
LAST UPDATE: A few weeks passed since I asked this question, now it seems to work and I am not sure why. Maybe Microsoft fixed it after I reported it to them.