Vinay
Vinay

Reputation: 1064

Extend an application to dual monitors

I have an application which runs on a single monitor. It has grids in that. Say for example if the application can hold 3 girds and there are 4 items to be placed, the 4th item should go to the second screen. Algo: Check for grid size if grid size is more than 3 open the remaining in the second(dual) screen.

Please let me know how to go about this.

Upvotes: 0

Views: 2585

Answers (2)

Destructor
Destructor

Reputation: 1771

http://msdn.microsoft.com/de-de/library/system.windows.forms.screen.allscreens.aspx

void showOnMonitor(int showOnMonitor) 
{ 
  Screen[] sc; 
  sc = Screen.AllScreens; 
  //get all the screen width and heights 
  Form2 f = new Form2(); 
  f.FormBorderStyle = FormBorderStyle.None; 
  f.Left = sc[showOnMonitor].Bounds.Width; 
  f.Top = sc[showOnMonitor].Bounds.Height; 
  f.StartPosition = FormStartPosition.Manual; 
  f.Show(); 
}

Upvotes: 3

Nico
Nico

Reputation: 1594

Inspect type System.Windows.Forms.Screen.

Upvotes: 0

Related Questions