In the MainWindow
constructor, before showing my MainWindow
, I'm doing some checks that could prompt a MessageBox
dialog. When this happens, an ugly Windows Default Icon is showing up in the Windows taksbar with the message box title beside.
I already set an Icon for my application in Properties -> Applicaton -> Resources -> Icon.
I tried to call InitializeComponent()
before calling MessageBox.Show
, but it doesn't change anything.
Once my application is fully launched (I exit the MainWindow
constructor), the proper icon appears in the taskbar.
Is there a way to prevent this ugly icon from showing at all, or to replace it with my own ?