Click here to Skip to main content
15,891,744 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am developing Desktop application, which loads a Form with different Texts and condition is so When i Click ok Button it shows Texts from the Form one by one
it is working perfectly but the Problem is i have more than one screen and say when i load a form on Current screen and click OK it stays at primary screen which is Ok ,but say when i load my form and drag it to next screen and click ok its comes back again to Primary Screen But i want it to stay on another Screen ...where i drag it into
here is line of code which loads my form
if (Form1.ShowDialog(this) == DialogResult.OK)
// at this line every time i click ok it shows the form but in Primary Screen so is there any solutions i can control the position i mean new position where i grag it into...
Posted

1 solution

Showing the form in a secondary monitor is very nicley explained in http://stackoverflow.com/questions/2561104/how-do-i-ensure-a-form-displays-on-the-additional-monitor-in-a-dual-monitor-sc[^]

So basically you need to store on which monitor/where the form was when it was closed and based on that data yo manually set the location when the form is opened the next time.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900