如何强制我想要的任何显示分辨率/时间?
我无法找到一种方法来在我的 C# 程序中强制执行我想要的任何显示分辨率/计时。我运行的是带有 GeForce 210 显卡的 Windows 7。我当前实现这些自定义分辨率的方法是使用驱动程序 GUI 手动添加自定义分辨率,然后使用 Windows 调用更改这些分辨率,但我需要一种实时添加新自定义分辨率的方法。我研究过 NVAPI,但找不到方法来做到这一点。我还研究了图形驱动程序的命令行工具,但无法让它工作。我的最后一招是重写注册表中的值,但我真的想避免这种情况。我愿意使用不同的编程语言或第三方工具,只要我可以通过我的程序从命令行调用它。有人能指出我正确的方向吗?
提前致谢。
更新(2011 年 8 月 16 日): 我一直在与 NVIDIA 合作解决这个问题,他们为我提供了先进的 NVAPI,使我能够重新创建他们的驱动程序的功能。他们还确认,他们提供的 NVAPI 基本版本不会执行此操作。
I am having trouble finding a way to force any display resolution/timing I want in my C# program. I am running Windows 7 with a GeForce 210 graphics card. My current method to achieve these custom resolutions is to use the driver GUI to manually add the custom resolutions and then use Windows calls to change to those resolutions but I need a way to add new custom resolutions in real time. I have looked into the NVAPI but I was not able to find a way to do this. I also looked into the command line tool for the graphics driver but I was not able to get it to work. My last resort is to rewrite the values in registry but I would really like to avoid that. I am willing to use a different programming language or a third party tool as long as I can invoke it from the command line via my program. Can anyone point me in the right direction?
Thanks in advance.
Update (8/16/2011):
I have been working on this problem with NVIDIA and they are providing me with an advanced NVAPI that will allow me to recreate the functionality of their driver. They also confirmed that the basic version of NVAPI that they provide will not do this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我通过使用 NDA 版本的 NVAPI 解决了这个问题。这仍然不是一件小事,但所有工具都在那里。
I was able to solve this problem by using the NDA version of the NVAPI. It still was not trivial but all of the tools are there.
您可以尝试使用 ChangeDisplaySettings
I'我不确定它是否具有 nvidia 面板提供的所有选项,但肯定有分辨率、刷新率、屏幕方向等基础知识。我过去自己用过它来动态更改屏幕方向(旋转单击按钮即可实现横向/纵向)。
You could try using ChangeDisplaySettings
I'm not sure if it will have all the options provided by the nvidia panel, but certainly the basics like resolution, refresh rate, screen orientation, etc. I've used it myself in the past to dynamically change screen orientation (rotate to landscape/portrait) on a click of a button.