开发者

Extend an application to dual monitors

开发者 https://www.devze.com 2023-03-23 01:18 出处:网络
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 g

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

精彩评论

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

关注公众号