Article ID: 190180
Article Last Modified on 7/14/2004
ActualFillColor = Point(100, 100)
If ActualFillColor = Point(x, y) Then
' Do some code ...
End If
Private Sub Form_Load()
Label1.Caption = "Test Color"
Shape1.FillStyle = 0 'Solid
Shape1.FillColor = &H8000000D 'System Color
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
Dim Color As Long
Color = Me.Point(X, Y)
If Color = Shape1.FillColor Then
Label1.Caption = "Mouse is over the shape!"
Else
Label1.Caption = "Mouse is Not over the shape!"
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
Dim ActualFillColor As Long
Dim Color As Long
ActualFillColor = Me.Point(Shape1.Left + 10, Shape1.Top + 10)
Color = Me.Point(X, Y)
If Color = ActualFillColor Then
Label1.Caption = "Mouse is over the shape!"
Else
Label1.Caption = "Mouse is Not over the shape!"
End If
End Sub
Additional query words: kbDSupport kbDSD kbVBp kbVBp400 kbVBp500 kbVBp600 kbNoKeyWord
Keywords: kbprb KB190180