首页 > 代码库 > 【C#】透屏幕,屏幕扩展
【C#】透屏幕,屏幕扩展
1 if (!SCREEN_STATE) 2 { 3 if (System.Windows.Forms.Screen.AllScreens.Count() > 1) 4 { 5 System.Windows.Forms.Screen s2 = System.Windows.Forms.Screen.AllScreens[1]; 6 System.Drawing.Rectangle r2 = s2.WorkingArea; 7 bigScreen = new BigScreen(); 8 9 bigScreen.GridMainContent.Children.Clear();10 TeamDataPage s = new TeamDataPage();11 bigScreen.GridMainContent.Children.Add(s);12 13 bigScreen.Top = r2.Top;14 bigScreen.Left = r2.Left;15 bigScreen.Width = r2.Width;16 bigScreen.Height = r2.Height;17 bigScreen.Show();18 bigScreen.WindowState = WindowState.Maximized;19 btn_BigScreen.Content = " 停止显示 ";20 SCREEN_STATE = true;21 }22 else23 {24 MessageBox.Show("找不到扩展屏幕!");25 }26 }27 else28 {29 btn_BigScreen.Content = " 大屏显示 ";30 if (bigScreen != null)31 bigScreen.Close();32 33 SCREEN_STATE = false;34 }
1、根据屏幕宽度,将要透屏的内容显示在主屏幕宽度之外!
【C#】透屏幕,屏幕扩展
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。