ShowBalloonTip Not Working

后端 未结 5 1109
无人及你
无人及你 2020-12-19 02:00

On Windows 10, the ShowBalloonTip method of NotifyIcon NEVER shows the balloon tip. This would appear to have something to do with Windows itself.<

相关标签:
5条回答
  • 2020-12-19 02:19

    On my computer with Windows 10 version 1803, go to Settings > System > Notifications & actions, and turn on "Get notifications from apps and other senders". The ballontips from my WPF app will show up.

    0 讨论(0)
  • 2020-12-19 02:20

    Change the Solution Configuration "Debug mode to Release mode" with X64 or X32 Solution platform. It will start work.

     public static NotifyIcon trayIcon;
     trayIcon = new NotifyIcon();
     trayIcon.Icon = new Icon("Images/Test.ico");
     trayIcon.Visible = true; trayIcon.Text=Path.GetFileNameWithoutExtension(AppDomain.CurrentDomain.FriendlyName);
     ContextMenu contextMenu1 = new ContextMenu();
    contextMenu1.MenuItems.Add("Menu2", Menu2_Event);
    contextMenu1.MenuItems.Add("Menu3", Menu3_event);
    contextMenu1.MenuItems.Add("Exit", Close_Click);
    trayIcon.ContextMenu = contextMenu1;
    trayIcon.BalloonTipText = "Hi Test";
    trayIcon.ShowBalloonTip(1000);
    
    0 讨论(0)
  • 2020-12-19 02:21

    Neither of these solved my issue :(

    But by accident I fixed it! My problem was I had my project configured for 32-bit on a 64-bit platform and for whatever reason they only show up when when I run the project for Any CPU (64-bit in this case)!!

    Hopefully that helps some of you, it was a real mystery for me...

    (I also posted this answer here because these are duplicate questions)

    0 讨论(0)
  • 2020-12-19 02:22

    Found the problem - was simple: Quiet Hours was turned on in the notification center and this was preventing the balloon tips.

    0 讨论(0)
  • 2020-12-19 02:27

    Turn off Focus Assist. If you are using second screen, turn off "When I'm duplicating my display" option. My settings is like that:

    0 讨论(0)
提交回复
热议问题