Hello everyone.
Here is my joystick control to allow an object to move
via the joystick control that is contained herein. Below
is an except code snippet.
Private
Sub OnMouseMove(ByVal
sender As
Object,
ByVal e
As
System.Windows.Forms.MouseEventArgs)
If isActive
Then
MouseAt = New
Point(e.X, e.Y)
PolarAtOld = MakeGrid(MouseAt)
magnitude = MagnitudeFromCenter()
GetCompassDirection()
OnPolarMouse(Me.Magnitude,
Me.CompassPoint)
End
If
End Sub
<BrowsableAttribute(True),
CategoryAttribute("Joystick"),
DescriptionAttribute("Magnitude of the crosshair from
the center")> _
Public
ReadOnly
Property
Magnitude() As
Double
Get
Return magnitude
End
Get
End
Property
As you can see that there is
Designer support added so that the joystick is
configurable.