Programming for Multiple Screens in DotNET

December 21, 2008 | By | Add a Comment

Display Settings
This is a piece of code I used for an application that needed to be displayed in 2 screens setup as extended view. I used a simple calculation to know the selected screen’s coordinates and place the form in its center. To try out the code listed below create 2 forms (Form1 and Form2). In form1 create a combobox and a button, name them screensComboBox and displayButton respectively. In Form2 set its StartupPosition to Manual. Then paste the code below in Form1 replacing the whole class.

 

Download Source Code

 



Related Posts:

Filed in: WinForms | Tags:

Leave a Reply

Trackback URL | RSS Feed for This Entry