Windows Develop Bookmark and Share   
 index > Windows Forms General > how do I display two windows forms on two different screens?
 

how do I display two windows forms on two different screens?

Hi,

I need to open two forms simultaneously on two different screens. The first screen is a touch screen that the user can interract with, the second screen is just a regular screen. I have two windows forms, I want form 1 to open on the first screen, and form 2 to open on the second screen - how would I achieve this? Also - both screens are connected to each other so for exampleif you slidea form across to the right of screen 1, it will appear on the left of screen 2.

Anyone an ideas? (in C# please!)

Thanks!

RB

RighteousBrother  Wednesday, March 26, 2008 4:34 PM
you could try setting the forms location to the screens X,Y pos

somthing like

Form1.Location = new Point(Screen.AllScreens[0].Bounds.Left,Screen.AllScreens[0].Bounds.Top);
Form2.Location = new Point(Screen.AllScreens[1].Bounds.Left,Screen.AllScreens[1].Bounds.Top);

i havent tested this code but it might be a start.

Tom.

Tom1984  Wednesday, March 26, 2008 5:27 PM
you could try setting the forms location to the screens X,Y pos

somthing like

Form1.Location = new Point(Screen.AllScreens[0].Bounds.Left,Screen.AllScreens[0].Bounds.Top);
Form2.Location = new Point(Screen.AllScreens[1].Bounds.Left,Screen.AllScreens[1].Bounds.Top);

i havent tested this code but it might be a start.

Tom.

Tom1984  Wednesday, March 26, 2008 5:27 PM

The spec's changed slightly, (first form1 opens, then I have to click a button on form1making the the second form open on the second screen) but you've definitely pointed me in the right direction!

Thanks,

RB

RighteousBrother  Thursday, March 27, 2008 9:52 AM

You can use google to search for other answers

Custom Search

More Threads

• Inheriting Windows Controls and lack of meaningful or even called overrides
• Read HTML file into an Object for parsing contents?
• How can I find out if a form (in my case a child form of MDI parent) is maximized?
• EM_GETCHARFORMAT
• A bit more on drawing 32 bit images in greyscale and color with full support for transparency
• DataGridView - combo box cell requires 2 click until drop down appears
• Windows App Standard toolstrip code?
• How to determine the default printer type?
• Fill the Datagrid on bases of Seleted node
• Authorization in windows forms/applications