Private Sub Command1_Click() M = Picture1.Point(X, Y) 'x和y表示坐标 r = m Mod 256 '转换16进制的颜色值为RGB g = m \ 256 Mod 256 '转换16进制的颜色值为RGB b = m \ 65536 '转换16进制的颜色值为RGB text1.text = R & "," & G & "," & B End Sub