Option Explicit
Private Const BITSPIXEL = 12
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
Private Sub Form_Load()
MsgBox "This system is using " & _
Format$(GetDeviceCaps(hdc, BITSPIXEL)) & _
"-bit color."
Unload Me
End Sub