相关疑难解决方法(0)

如何获取Windows显示设置?

Windows 7中的显示设置(控制面板 - >显示).它允许更改屏幕上的文本和其他项目的大小.我需要让这个设置能够根据设置值打开/关闭我的C#应用​​程序中的某些功能.那可能吗?

c# windows dpi

67
推荐指数
9
解决办法
7万
查看次数

如何执行虚拟鼠标而不使用鼠标单击C#

我想在不使用真正鼠标的情况下在Windows应用程序中执行单击(因此我可以将其最小化).就像机器人的行为一样.

我该怎么做?

c# mouse virtual click

3
推荐指数
2
解决办法
3万
查看次数

在控制台应用程序中获取屏幕分辨率

如何在控制台应用程序中获取屏幕分辨率(如果可能)?

Forms我可以使用:

int height = Screen.PrimaryScreen.Bounds.Height;
int width = Screen.PrimaryScreen.Bounds.Width;
Run Code Online (Sandbox Code Playgroud)

但我正在寻找专门的控制台方式。


所以解决我的问题的方法是由Marc-Antoine Jutras提出的。我需要int价值观,所以我是这样的:

    int height = Convert.ToInt32(SystemParameters.PrimaryScreenHeight);
    int width = Convert.ToInt32(SystemParameters.PrimaryScreenWidth);
Run Code Online (Sandbox Code Playgroud)

c#

3
推荐指数
1
解决办法
8777
查看次数

标签 统计

c# ×3

click ×1

dpi ×1

mouse ×1

virtual ×1

windows ×1