如何在C#中更改屏幕分辨率? [英] How to change screen resolution in C #?
本文介绍了如何在C#中更改屏幕分辨率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建一个允许用户设置其屏幕分辨率的程序。但我找不到能帮助我应对这一挑战的人。请帮帮我们吧!
我的尝试:
我知道如何在C#提示命令中执行,所以我也找了一些允许我改变屏幕分辨率的命令,但我还是没找到它。请帮助我。
解决方案
您必须调用Windows API函数: ChangeDisplaySettingsA函数| Microsoft Docs [ ^ ]
这需要使用调用或编写包装器。但已经这样做了:
以编程方式更改显示设置 [ ^ ]
动态屏幕分辨率 [ ^ ]
在开始申请之前更改解决方案 [ ^ ]
更改屏幕分辨率C# - G oogle搜索 [ ^ ]
I want to create a program that allows the user to set the resolution of their screen. But I can not find someone who can help me in this challenge. Please help me guys!
What I have tried:
I know how to execute in C # prompt commands, so I also looked for some commands that would allow me to change the screen resolution, but I still have not found it. Please help me.
解决方案
You have to call a Windows API function: ChangeDisplaySettingsA function | Microsoft Docs[^]
This requires using invoke or writing a wrapper. But such has been done already:
Changing Display Settings Programmatically[^]
Dynamic Screen Resolution[^]
Change Resolution Before Starting Application[^]
change the screen resolution C# - Google Search[^]
这篇关于如何在C#中更改屏幕分辨率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文