vb 当前屏幕 位色(色深)

来源:百度知道 编辑:UC知道 时间:2024/06/03 18:24:53

Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long

Private Const BITSPIXEL = 12
Private Sub Form_Load()
MsgBox "当前颜色深度:" & GetDeviceCaps(Me.hdc, BITSPIXEL) & "位"
End Sub