どなたか詳しい方このコードの解説をしてください。
Public Type RGBValue
R As Single
G As Single
b As Single
End Type
Public Function GetRGB(Col As Long) As RGBValue
With GetRGB
.R = Col And 255
.G = (Col And 65280) / 256&
.b = (Col And 16711680) / 65535
End With
End Function
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim lCol as long
Dim myRGB as RGBValue
lCol = Picture1.Point(X, Y)
myRGB = GetRGB(lCol)
End Sub
Picture1上のマウスが押された箇所のRGBを取得するコードです。
編集 削除かっぽれさん回答有り難うございます。
編集 削除