以编程方式更改屏幕分辨率? [英] Programmatically change screen resolution?
问题描述
在Windows XP中是否可以通过编程方式更改屏幕分辨率或启用/禁用多台显示器?例如,将一台显示器的1024x768更改为两台显示器的1280x104?我对Win32函数最感兴趣,但是只要能与Windows快捷方式绑定的任何东西都足够.
Is there a way to programmatically change the screen resolution or enable/disable multiple monitors in Windows XP? For example to change from 1024x768 with one monitor to 1280x104 on two monitors? I would be most interested in a win32 function to do this but anything that can be tied to a windows shortcut would suffice.
推荐答案
您可以使用 EnumDisplayDevices 找出可用的显示内容,并 EnumDisplaySettings 以获得显示器可用分辨率的列表.使用 ChangeDisplaySettings 设置所需的分辨率.
You can use EnumDisplayDevices to figure out what displays you have available and EnumDisplaySettings to get a list of available resolutions for your displays. Use ChangeDisplaySettings to set the resolution you need.
这篇关于以编程方式更改屏幕分辨率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!