Tried the CreateParams override as suggested here, however, the taskbar button does not appear on initial load. The user has to activate another window, then re-activate the target window before the taskbar button appears.
Any reason why this is so? How do you workaround this?
Try adding the WS_EX_APPWINDOW flag to the
ExStyleproperty of CreateParams.Windows is trying to guess whether your window should have a taskbar button by looking at the caption and other styles. The
WS_EX_APPWINDOWmakes it explict so Windows doesn’t have to guess.WS_EX_TOOLWINDOW makes it explicit that you should NOT have a taskbar button.
Edit: like this