You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did it work in any of the earlier releases of .NET Core or .NET 5+?
No response
Issue description
If a blocking operation (such as Thread.Sleep) is placed in the constructor of a form before the call to InitializeComponent(), and this operation takes longer than approximately 5000 milliseconds, the application's icon does not appear in the Windows taskbar until the form is fully initialized.
This creates confusion for users, as they may think the application has not started at all.
I would highly appreciate it if your team could review this behavior and confirm whether it is a known issue or potentially a bug that could be fixed in future versions of WinForms.
For your information, this issue has been reproduced on the following operating system:
OS Name: Microsoft Windows 11 Pro
Version: 10.0.26100 Build 26100
Steps to reproduce
I have prepared a minimal WinForms application to demonstrate this behavior. The code includes two constants:
4000 ms – the icon appears correctly
5000 ms – the icon does not appear
You can switch between them in Form1.cs to observe the difference.
This is the expected behavior when you have a blocking operation in the constructor. The icon is not an application bound entity, it is the host form. If the form isn't constructed, you can't have access to the icon.
I understand that blocking operations in the constructor can delay the form creation, which may cause the taskbar icon to appear with a delay. However, in my case, the issue is more serious: the taskbar icon never appears at all, even after the constructor finishes and the form is fully initialized.
To clarify:
The application runs correctly after the blocking call.
The main window becomes interactive and fully usable.
But the icon in the Windows taskbar never appears, which misleads users into thinking the application didn’t launch, even though it’s already running.
This issue only occurs when the blocking operation before InitializeComponent() takes longer than approximately 5000 milliseconds. Shorter delays (e.g., 4000 ms) do not cause this behavior.
I would appreciate it if the team could review this behavior once again to determine whether this is a potential bug or something that could be improved in future versions.
.NET version
.NET Framework 4.7.1
Did it work in .NET Framework?
No
Did it work in any of the earlier releases of .NET Core or .NET 5+?
No response
Issue description
If a blocking operation (such as
Thread.Sleep
) is placed in the constructor of a form before the call toInitializeComponent()
, and this operation takes longer than approximately 5000 milliseconds, the application's icon does not appear in the Windows taskbar until the form is fully initialized.This creates confusion for users, as they may think the application has not started at all.
I would highly appreciate it if your team could review this behavior and confirm whether it is a known issue or potentially a bug that could be fixed in future versions of WinForms.
For your information, this issue has been reproduced on the following operating system:
OS Name: Microsoft Windows 11 Pro
Version: 10.0.26100 Build 26100
Steps to reproduce
I have prepared a minimal WinForms application to demonstrate this behavior. The code includes two constants:
4000 ms
– the icon appears correctly5000 ms
– the icon does not appearYou can switch between them in
Form1.cs
to observe the difference.I’ve attached a ZIP
WinFormsTaskbarBugDemo.zip
archive with the full project and a README file explaining the steps to reproduce the issue.
The text was updated successfully, but these errors were encountered: