蜜桃欧美|戒汤唯未删减版|先锋影音av资源在线观看|国产精品裸体一区二区三区,这么多年电影完整版免费在线观看,卧底2020电视剧免费全集在线观看,美好事物电影完整版在线观看

主營業(yè)務(wù):網(wǎng)站制作 網(wǎng)站優(yōu)化 小程序制作 石家莊網(wǎng)站制作網(wǎng)站建設(shè)有限公司歡迎您!
石家莊閃云網(wǎng)絡(luò)科技有限公司
客服熱線15383239821
如何讓自己的網(wǎng)站更有質(zhì)量?

C# 獲取當(dāng)前屏幕大小或任務(wù)欄大小,不用API

發(fā)布時間:2011/3/15 16:41:19

使用SystemInformation類

//當(dāng)前的屏幕除任務(wù)欄外的工作域大小
string currentScreenSize_OutTaskBar=SystemInformation.WorkingArea.Width.ToString() + "," +SystemInformation.WorkingArea.Height.ToString();
MessageBox.Show("當(dāng)前的屏幕除任務(wù)欄外的工作域大小為:"+currentScreenSize_OutTaskBar);

//當(dāng)前的屏幕包括任務(wù)欄的工作域大小
string currentScreenSize=System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width.ToString() + "," + System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height.ToString();
MessageBox.Show("當(dāng)前的屏幕包括任務(wù)欄的工作域大小為:"+currentScreenSize);

//任務(wù)欄大小
Size OutTaskBarSize = new Size(SystemInformation.WorkingArea.Width, SystemInformation.WorkingArea.Height);

Size ScreenSize = new Size(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height);

Size TaskBarSize;

TaskBarSize = new Size(
                (ScreenSize.Width - (ScreenSize.Width - OutTaskBarSize.Width)),
                (ScreenSize.Height - OutTaskBarSize.Height)
                );

MessageBox.Show("任務(wù)欄大?。?quot; + TaskBarSize.Width + "," + TaskBarSize.Height);

相關(guān)新聞推薦

在線客服 : 服務(wù)熱線:15383239821 電子郵箱: 27535611@qq.com

公司地址:石家莊市新華區(qū)九中街江西大廈4062

備案號:冀ICP備2022000585號-4