Skip to content

[Bug]: NotifyIcon displays an empty, miniature black tooltip box when Text is string.Empty on Windows 11 #15051

Open

Description

@Yukki76

.NET version

.NET 10.0.11

Did it work in .NET Framework?

Not tested/verified

Did it work in any of the earlier releases of .NET Core or .NET 5+?

不明

Issue description

Image

これが仕様であるのであれば申し訳ありません。
ツールチップを空文字を設定すると画像のように空のツールチップが表示されます。
Notifyicon.csの659行目

data.uFlags |= NOTIFY_ICON_DATA_FLAGS.NIF_TIP;
data.Tip = _text;

とありますが、正しくは

if (_text is not "")
{
    data.uFlags |= NOTIFY_ICON_DATA_FLAGS.NIF_TIP;
    data.Tip = _text;
}

ではないでしょうか?

Steps to reproduce

 _notifyIcon.Text = string.Empty;
 _notifyIcon.Icon = Resources.MemoryCleaner;
 _notifyIcon.ContextMenuStrip = _contextMainItem;
 _notifyIcon.Visible = true;
 _notifyIcon.Text = string.Empty;
 _notifyIcon.Icon = Resources.MemoryCleaner;
 _notifyIcon.ContextMenuStrip = _contextMainItem;
 _notifyIcon.Visible = true;

Textにstring.Emptyを設定する。

Activity

  1. added
    untriagedThe team needs to look at this issue in the next triage
    on Sep 7, 2026
  2. self-assigned this
    on Sep 8, 2026
  3. LeafShi1 commented on Sep 8, 2026

    @LeafShi1
    Member

    @Yukki76 My local environment is Windows 25H2, build 26200.9106, and I haven't been able to reproduce this issue.

    Please provide the following information for further verification:

    • Complete Windows build (winver)
    • The screenshot shows the problem is in the main tray area. Does this issue also exist in the overflow area?
    • Comparison of .NET Framework on the same machine
    • Minimum runnable project
  4. Yukki76 commented on Sep 8, 2026

    @Yukki76
    Author
    Image

    The version is as shown in the image.
    I'm developing a background application, and after running it for a while, hovering the mouse over the task icon displays an empty popup.
    I've created a custom popup to display, and I haven't specified NotifyIcon.Text. I also reproduced the issue using string.Empty.
    I'll observe the situation a bit longer and report back.
    I apologize for the trouble.

  5. Yukki76 commented on Sep 17, 2026

    @Yukki76
    Author
    Image

    starts, and sometimes it does not. On one occasion, the issue was noticed while the application was running in the system tray.
    The source code where the issue was confirmed is available at the following link:
    https://github.com/Yukki76/TrayIconTest
    This is a simple program that displays the string and length of the tooltip currently set in NotifyIcon in a custom tooltip (form).
    Currently, a null character (string.Empty) is set to display the custom tooltip.

    Environment where the issue was confirmed:
    OS: Microsoft Windows 11 Home 25H2 (OS build 26200.9457)
    .NET Version: .NET 10.0.12
    We apologize for bothering you during your busy schedule, but we would appreciate your assistance.

  6. LeafShi1 commented on Oct 12, 2026

    @LeafShi1
    Member

    Thanks for providing the repro project and the additional context.

    I've tested the provided project multiple times but haven't been able to reproduce the issue. I also tried running the application in the system tray, but haven't observed the miniature black tooltip.

    Since this seems to occur intermittently, we'll likely need more information about the conditions that trigger it before we can investigate further. If you notice any consistent pattern or additional reproduction steps, please let us know.

    Image
  7. dotnet-policy-service commented on Oct 26, 2026

    @dotnet-policy-service
    Contributor

    This submission has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 14 days.

    It will be closed if no further activity occurs within 7 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions