屏幕的相关参数 //获得屏幕各种参数 label1.Text = "this.Height = " + this.Height.ToString() + "/n"; label1.Text += "this.Width = " + this.Width.ToString() + "/n"; label1.Text += "Screen.PrimaryScreen.WorkingArea.Height = " + Screen.PrimaryScreen.WorkingArea.Height.ToString() + "/n"; label1.Text += "Screen.PrimaryScreen.WorkingArea.Width = " + Screen.PrimaryScreen.WorkingArea.Width.ToString() + "/n"; label1.Text += "Screen.PrimaryScreen.Bounds.Height = " + Screen.PrimaryScreen.Bounds.Height.ToString() + "/n"; label1.Text += "Screen.PrimaryScreen.Bounds.Width = " + Screen.PrimaryScreen.Bounds.Width.ToString() + "/n"; label1.Text += "SystemInformation.MenuHeight = " + SystemInformation.MenuHeight.ToString() + "/n"; //屏幕大小 wchar_t buffer[200]; int dx=GetSystemMetrics(SM_CXSCREEN); //宽 int dy=GetSystemMetrics(SM_CYSCREEN);//高 int iCaption = GetSystemMetrics(SM_CYCAPTION);// int iMenu = GetSystemMetrics(SM_CYMENU);//菜单 swprintf(buffer,L"size is %d and %d and Caption Height is %d and menu height is %d",dx,dy,iCaption,iMenu); //宽字符集2010-4-13 SetDlgItemText(IDC_EDIT1,buffer);