先将图片加载 将鼠标指向红点 从text1里面获取这个点的颜色值
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Text1.Text = Picture1.Point(X, Y)
End Sub
然后
Private Sub Command2_Click()
For Y = 0 To Picture1.Height
For X = 0 To Picture1.Width
DoEvents
Me.Caption = X & ":" & Y
If Picture1.Point(X, Y) = 3355596 Then '‘‘其中3355596这个数值改为刚刚获取的值
MsgBox X & ":" & Y
find = True
Exit For
End If
Next X
If fine = ture Then
Exit For
End If
Next Y
End Sub