Description
.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 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 correctly5000 ms
– the icon does not appear
You can switch between them in Form1.cs
to observe the difference.
I’ve attached a ZIP
archive with the full project and a README file explaining the steps to reproduce the issue.