时间:2021-05-26
复制代码 代码如下:
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
Private Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDisplaySettingsA" (lpDevMode As Any, ByVal dwflags As Long) As Long
Private Const CCDEVICENAME As Long = 32
Private Const CCFORMNAME As Long = 32
Private Const DM_BITSPERPEL As Long = &H40000
Private Const DM_PELSWIDTH As Long = &H80000
Private Const DM_PELSHEIGHT As Long = &H100000
Private Const DM_DISPLAYFLAGS As Long = &H200000
Private Const DM_DISPLAYFREQUENCY = &H400000
Private Const CDS_FORCE As Long = &H80000000
Private Const BITSPIXEL As Long = 12
Private Const HORZRES As Long = 8
Private Const VERTRES As Long = 10
Private Const VREFRESH = 116
Private Type DEVMODE
dmDeviceName As String * CCDEVICENAME
dmSpecVersion As Integer
dmDriverVersion As Integer
dmSize As Integer
dmDriverExtra As Integer
dmFields As Long
dmOrientation As Integer
dmPaperSize As Integer
dmPaperLength As Integer
dmPaperWidth As Integer
dmScale As Integer
dmCopies As Integer
dmDefaultSource As Integer
dmPrintQuality As Integer
dmColor As Integer
dmDuplex As Integer
dmYResolution As Integer
dmTTOption As Integer
dmCollate As Integer
dmFormName As String * CCFORMNAME
dmUnusedPadding As Integer
dmBitsPerPel As Integer
dmPelsWidth As Long
dmPelsHeight As Long
dmDisplayFlags As Long
dmDisplayFrequency As Long
End Type
Private Sub cmdChangeDesktopMode_Click()
Dim DM As DEVMODE
With DM
.dmPelsWidth = CInt(txtNewWidth.Text)
.dmPelsHeight = CInt(txtNewHeight.Text)
.dmBitsPerPel = CInt(txtNewColor.Text)
.dmDisplayFrequency = CInt(txtNewFreq.Text)
.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT Or DM_BITSPERPEL Or DM_DISPLAYFREQUENCY
.dmSize = LenB(DM)
End With
If ChangeDisplaySettings(DM, CDS_FORCE) <> 0 Then
MsgBox "错误!不支持此模式!"
End If
End Sub
Private Sub Form_Load()
txtOldWidth.Text = GetDeviceCaps(Me.hdc, HORZRES)
txtOldHeight.Text = GetDeviceCaps(Me.hdc, VERTRES)
txtOldColor.Text = GetDeviceCaps(Me.hdc, BITSPIXEL)
txtOldFreq.Text = GetDeviceCaps(Me.hdc, VREFRESH)
End Sub
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
屏幕分辨率与刷新率-添加-自定义分辨率设置,在宽度/高度/屏幕刷新率/处填写1440/900/75Hz点击添加确定。再应用1440*90075Hz就可以了。或者
以电脑为例,信号超出范围的原因及处理方法:分辨率和刷新率问题,设置的分辨率或者刷新率超出了显示器能够显示的正常范围,所以就出现所说的问题了,重新设置下分辨率或者
老显示器频率超出范围一般造成的原因为显卡分辨率设置(分辨率,刷新率)高于显示器的标准分辨率(刷新率)。解决办法:重新启动电脑,按f8进安全模式,进系统改成标准分
以电脑为例,输入信号超出范围的原因及处理方法:分辨率和刷新率问题,设置的分辨率或者刷新率超出了显示器能够显示的正常范围,所以就出现你所说的问题了,重新设置下分辨
刷新率是指电子束对屏幕上的图像重复扫描的次数。刷新率越高,所显示的图象稳定性就越好。刷新率高低将直接决定其价格,但是由于刷新率与分辨率两者相互制约,因此只有在高