c++中:
int
cxScreen,cyScreen;
cxScreen=GetSystemMetrics(SM_CXSCREEN);
cyScreen=GetSystemMetrics(SM_CYSCREEN);
c#中:
[DllImport("user32")]
public static extern int
GetSystemMetrics(int nIndex);
//获取分辨率宽度
int x = GetSystemMetrics(0);
//获取分辨路高度
int y
= GetSystemMetrics(1);
调用windows api 获取系统分辨率,布布扣,bubuko.com
原文:http://www.cnblogs.com/moonlight-zjb/p/3631939.html