I've created a winforms application. All is running fine, also the taskbar button is created and shown in taskbar including the correct icon.
Whenever I move the form from one display to the second display, the taskbar button stays at the display from where the form was initial start.
I also compared the settings with another winforms application where the behaviour is correct. Means, the button is moving/switching/whatever
to the active display where the form is moved to.
Hopefully it is just a small thing, but I came not across with it.
It is an OS feature.
Taskbar
properties and in Multiple displays
settings, check Show taskbar on all displays
and then set the value of Show taskbar bottons on:
to Taskbar where window is open