如何强制我想要的任何显示分辨率/时间?

发布于 2024-11-26 14:26:31 字数 442 浏览 2 评论 0原文

我无法找到一种方法来在我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

喜你已久 2024-12-03 14:26:32

我通过使用 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.

岁月如刀 2024-12-03 14:26:31

您可以尝试使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文