8

I try to show a balloon tip like the one in the screenshot:

enter image description here

First I created a notifyIcon

enter image description here

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. enter image description here

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:

enter image description here enter image description here

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.

enter image description here

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:

enter image description here

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.

stasiaks
  • 1,268
  • 2
  • 14
  • 31
Black
  • 18,150
  • 39
  • 158
  • 271
  • Are you sure you're not looking for the `notifyIcon1.Text` property? https://msdn.microsoft.com/en-us/library/system.windows.forms.notifyicon.icon(v=vs.110).aspx close to the end of the Form1() constructor. – interesting-name-here Aug 03 '17 at 20:15
  • Nvm. the `.Text` property will just put the change in your last picture but not what you want which is your first picture. – interesting-name-here Aug 03 '17 at 20:17
  • I try the same like in this question (https://stackoverflow.com/questions/15215716/how-to-show-a-message-with-icon-in-the-notification-area) but the solutions from there are not working for me. – Black Aug 03 '17 at 20:17
  • No, there is only a warning because of my onedrive being full. – Black Aug 03 '17 at 20:19

0 Answers0