Hi,
I have a project which runs on 'dual monitor' PC's. I only want to use one monitor at a time, but I want the user to pick which monitor they want to use (Primary or Secondary). I have set form1 to have a manual start position, and the user can move this between monitors. When form1 is closed and reopened it remembers which monitor it was on and will open on that monitor again. This bit works fine.
If form1 is on the Primary monitor I want all child forms (and dialogues) to open on the Primary monitor. If another user chooses to move form1 onto the secondary monitor I want all child forms (and dialogues) to open on the secondary monitor.

I can determine which monitor form1 is on with the code: Screen.FromControl(Me).Primary which returns True or False, but is there a way to specify a 'default' screen for all child forms and dialogues.
Many thanks

Thanks tiinstaafl - that link gave me the final info I was looking for. Just for completeness, here is what I did:
In the project properties I added a new setting 'MainFormLocation' with a type of System.Drawing.Point
This allows form1 to 'remember' its last location, so when the user relaunches the app, it opens on the same screen and at the same location as it was closed on.

In each form (including form1) I changed two properties:
ApplicationSettings.Location: MainFormLocation
StartPosition: Manual
This tells each form to launch on the same screen as form1.
Thanks again

You're very welcome. Please remember to mark this answered, thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.