新建From1(窗体),代码:
Private Declare Function GetBkColor Lib "gdi32" (ByVal hdc As Long) As Long
Private Sub Form_Load()
Me.BackColor = &H12C034
MsgBox "Background color of form is " & Hex(GetBkColor(Me.hdc))
Me.BackColor = &HC0C0C0
MsgBox "Background color of form is " & Hex(GetBkColor(Me.hdc))
End Sub