I am trying to figure out how to move specified System.Windows.Forms.Form onto another than primary screen. I have ComboBox with list of available screens where user selects whichever screen he likes and my application is supposed to move one of its windows onto that screen.
I have only one screen on my laptop and no external monitor, so ComboBox on my computer offers only one option. I think minimalising desired window, moving it’s left corner in the center of selected screen’s Bounds and maximilising would do the job, right? I just can’t test it. Is this a good way to go?
Thanks in advance!
Here’s what I did, as a simple test…
I added a simple wrapper class so that I could change what happens on the ToString call (I only wanted to see the name listed in the combo box)
In the form load event I added this:
And for the selected index change event of the combo box I had this:
It moved the form to the upper left hand corner of each of my screens.