开发者

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 item开发者_JAVA百科s 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.


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(); 
}


Inspect type System.Windows.Forms.Screen.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜