0

I want to move a maximized form to another screen, but setting the location doesn't seem to work in the maximized-state.

Is there any way to move it to another screen without changing its WindowState?

AaronMaria
  • 11
  • 1
  • Did you check [Showing a Windows form on a secondary monitor?](https://stackoverflow.com/questions/1363374/showing-a-windows-form-on-a-secondary-monitor) – Panagiotis Kanavos Feb 01 '19 at 11:46
  • Have you tried `this.Location = Screen.AllScreens[1].WorkingArea.Location` or setting the state to Normal, moving and then maximizing? – Panagiotis Kanavos Feb 01 '19 at 11:47
  • It seems changing the Location while Maximized doesn't move it. Changing the WindowState to normal, then changing the location, then Maximizing does work. I wanted to know if there was a way of moving while maximized. – AaronMaria Feb 01 '19 at 13:29

1 Answers1

0

After consultation with Microsoft we learned that the only way to do this is to hide the form (window), wait 10ms, set the state to Normal, set the new location (keep DPI settings in mind), set the state to Maximized, wait 10ms, and show the form (window).

Matthew K
  • 973
  • 6
  • 21