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);

相关文章:

  • 2021-10-28
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2021-07-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
  • 2021-09-09
相关资源
相似解决方案