Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there,

I have a custom made Dialog box that opens when the user calls it (button click). This works fine on a single screen. The problem I have is that when the parent application is on the secondary screen, the dialog box open in the primary screen.

Can anyone tell me how can I make the dialog box open in the same screen as the parent?
Posted

1 solution

You can use Screen.FromControl[^] to find on which screen the window is (or at least the most of it) and then set the location of your window based on that screens location.
 
Share this answer
 

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