0

I have two form and two screens in a .Net application.

When I run the program, I want to specify where the forms are located: the main form must run on first screen and second form must run on second screen.

How can I specify the screen location for forms?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Please add code of what you already have tried to accomplish this. Also, how was this [asp-classic] if it is also [.net]? Is this an App or desktop application? I will assume that is win forms. – Daniel Gimenez Jul 28 '13 at 22:21

1 Answers1

4

All you need to setup form.Location = new Point(X,Y);

All screens are located on the same coordinate grid with 0,0 point on the top left corner of the primary screen.

You can use System.Windows.Forms.Screen.AllScreens to get positions and sizes (in Bounds property of a screen) to decide where to put your form. Note that screen on the left or above the main screen has negative coordinates of top-left corner.

dmay
  • 1,340
  • 8
  • 23