Windows Develop Bookmark and Share   
 index > Windows Forms General > Multiple monitors
 

Multiple monitors

I can get the number of monitors connected to a system by using the SystemInformation.MonitorCount property, but is it possible to force an application to appear on a monitor other than the primary ?
MigrationUser 1  Wednesday, February 19, 2003 10:14 AM
I think you should be able to use the Screen class to do what you're asking.  Assumimg you have 2 monitors, you could do something like this to have your form appear in the top left of the second monitor:

Screen s = Screen.AllScreens[1];
myForm.DesktopLocation = s.Bounds.Location;

I don't have a multi-mon machine available at the moment so I can't test this but I think this should work.

Thanks,
Kevin

--
Windows Forms Team
MigrationUser 1  Wednesday, February 19, 2003 4:54 PM
FWIW, I just tried it and it works fine. I hadn't played with this yet, and was eager to give it a try. Very cool! -- Ken
MigrationUser 1  Wednesday, February 19, 2003 8:27 PM
Many thanks guys, it works a treat!
MigrationUser 1  Thursday, February 20, 2003 3:23 AM

You can use google to search for other answers

Custom Search

More Threads

• webBrowser preserveHTML property?
• what the... Windows CE Forms app and pan & zoom
• Why does this insert doesn't work??
• Behaviour of ComboBox vs. ListBox
• Listbox not displaying text on XP Home Edition but OK on XP Pro
• Treeview Checkboxes bitmaps
• joyGetDevCaps on VB.Net anyone?
• Inherit from a BaseForm
• Refreshing ListBox strings
• IAzRolesLib from .NET 2.0