VERSION 2.00
Begin Form JSample 
   Caption         =   "Joystick Sample"
   ClientHeight    =   5070
   ClientLeft      =   1005
   ClientTop       =   2145
   ClientWidth     =   8175
   Height          =   5475
   Left            =   945
   LinkTopic       =   "Form1"
   ScaleHeight     =   5070
   ScaleWidth      =   8175
   Top             =   1800
   Width           =   8295
   Begin Timer Timer1 
      Interval        =   1000
      Left            =   7560
      Top             =   3120
   End
   Begin Joystick Joystick1 
      Enabled         =   0   'False
      Left            =   3360
      Top             =   240
   End
   Begin CommandButton Command1 
      Caption         =   "Capture Joystick"
      Height          =   315
      Left            =   2580
      TabIndex        =   3
      Top             =   1920
      Width           =   1785
   End
   Begin Label Label6 
      Caption         =   "The property named Period is used to set the amount of time in milliseconds that the joystick driver uses for checking position and button status. The other properties should be more-or-less obvious. You can expirement by setting Capture to True in the Properties Window and changing/observing the other properties. Good Luck!"
      Height          =   915
      Left            =   210
      TabIndex        =   8
      Top             =   4020
      Width           =   7785
   End
   Begin Label Label5 
      Caption         =   "Joystick_ButtonUp( Button As Integer )"
      Height          =   285
      Left            =   480
      TabIndex        =   7
      Top             =   3600
      Width           =   6675
   End
   Begin Label Label4 
      Caption         =   "Joystick_ButtonDown( Button As Integer )"
      Height          =   285
      Left            =   480
      TabIndex        =   6
      Top             =   3180
      Width           =   6585
   End
   Begin Label Label2 
      Caption         =   "Joystick_Move( X As Integer, Y As Integer, Z As Integer)"
      Height          =   285
      Left            =   480
      TabIndex        =   5
      Top             =   2760
      Width           =   6555
   End
   Begin Label Label1 
      Caption         =   "Once the joystick has been captured there are three events that may be generated:"
      Height          =   285
      Index           =   2
      Left            =   240
      TabIndex        =   4
      Top             =   2340
      Width           =   7755
   End
   Begin Label Label1 
      Caption         =   "Before the control will generate events, or update the position properties you must enable it by setting Capture to True. Press the following button to set Capture to True/False. "
      Height          =   495
      Index           =   1
      Left            =   210
      TabIndex        =   2
      Top             =   1350
      Width           =   7815
   End
   Begin Label Label1 
      Caption         =   "JOYSTK.VBX contains a fully functional joystick control. Using this control you can easily  respond to joystick movements and button presses."
      Height          =   495
      Index           =   0
      Left            =   210
      TabIndex        =   1
      Top             =   720
      Width           =   7785
   End
   Begin Label Label3 
      Caption         =   "Joystick Control"
      FontBold        =   -1  'True
      FontItalic      =   0   'False
      FontName        =   "MS Sans Serif"
      FontSize        =   18
      FontStrikethru  =   0   'False
      FontUnderline   =   0   'False
      Height          =   495
      Left            =   240
      TabIndex        =   0
      Top             =   150
      Width           =   2925
   End
End

Sub Command1_Click ()
    Joystick1.Enabled = Not Joystick1.Enabled
    If (Joystick1.Enabled) Then
        Command1.Caption = "Release Joystick"
    Else
        Command1.Caption = "Capture Joystick"
    End If
End Sub

Sub Form_Load ()
    JSample.Top = (Screen.Height - JSample.Height) / 2
    JSample.Left = (Screen.Width - JSample.Width) / 2
End Sub

Sub Joystick1_ButtonDown (button As Integer)
    Label4.Caption = "Joystick_ButtonDown(" & Str(button) & " )"
    Label4.ForeColor = RGB(255, 0, 0)
End Sub

Sub Joystick1_ButtonUp (button As Integer)
    Label5.Caption = "Joystick_ButtonUp(" & Str(button) & " )"
    Label5.ForeColor = RGB(255, 0, 0)
End Sub

Sub Joystick1_Move (x As Integer, y As Integer, z As Integer)
    Label2.Caption = "Joystick1_Move(" & Str(x) & "," & Str(y) & "," & Str(z) & ")"
End Sub

Sub Timer1_Timer ()
    Label4.ForeColor = 0
    Label5.ForeColor = 0
End Sub

