z toho kódu sa pokúšam dostať hodnotu cez premennú aby som sňou mohol ďaľej pracovať
Kód:
Public joXpoz As Integer
Public joYpoz As Integer
Public joZpoz As Integer
<StructLayout(LayoutKind.Sequential)> _
Public Structure JOYINFOEX
Public dwSize As Integer
Public dwFlags As Integer
Public dwXpos As Integer
Public dwYpos As Integer
Public dwZpos As Integer
End Structure
Dim myjoyEX As JOYINFOEX
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
' Get the joystick information
Call joyGetPosEx(0, myjoyEX)
With myjoyEX
Label10.Text = .dwXpos.ToString 'Up to six axis supported
joXpoz = .dwXpos.ToString
Label11.Text = .dwYpos.ToString
Label12.Text = .dwZpos.ToString
End With
End Sub