资 源 简 介
C# 改变屏幕分辨率,功能仿windows 的屏幕分辨率设置,改变滑块改变分辨率大校本例可学习一下滑块的用法。源代码如下:
long RetVal = 0;
DEVMODE dm = new DEVMODE();
dm.dmSize = (short)Marshal.SizeOf(typeof(DEVMODE));
dm.dmPelsWidth = dWidth;//宽
dm.dmPelsHeight = dHeight;//高
dm.dmDisplayFrequency = 85;//刷新率
dm.dmFields = DEVMODE.DM_PELSWIDTH | DEVMODE.DM_PELSHEIGHT | DEVMODE.DM_DISPLAYFREQUENCY | DEVMODE.DM_BITSPERPEL;
RetVal = ChangeDisplaySettings(ref dm, 0);