At the moment I have the code below to determine if the mouse pointer is within a certain rectangular region, I'm trying to come up with fast (it has to go in the mouse move event) boolean function to determine if a point lies within a polygon as defined by an arbitrary array of points, your imput would be very welcome

Code:
Public Type myRectangle
    TLX As Integer      'Top Left X
    TLY As Integer      'Top Left Y
    BRX As Integer      'Bottom Right X
    BRY As Integer      'Bottom Right Y
    
End Type

Public Function MouseInRect(MouseX As Integer, MouseY As Integer, Rect As myRectangle) As Boolean

    If MouseX >= Rect.TLX And MouseY >= Rect.TLY And MouseX <= Rect.BRX And MouseY <= Rect.BRY Then
        MouseInRect = True
    Else
        MouseInRect = False
    End If

End Function