Results 1 to 12 of 12

Thread: [VB6] - api messages const

Threaded View

  1. #10

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    Re: [VB6] - api messages const

    Quote Originally Posted by LaVolpe View Post
    joySetCapture API is probably the answer then
    give me an advice... if i put that joystick 'if' from timer control in these procedure, will works?
    Code:
    Call PollJoystick
            If (MYJOYEX.dwXpos = 0 And MYJOYEX.dwYpos = 0) Then
                Direction = DirectionLeftUp
            ElseIf (MYJOYEX.dwXpos = 0 And MYJOYEX.dwYpos = 65535) Then
                Direction = DirectionLeftDown
            ElseIf (MYJOYEX.dwXpos = 65535 And MYJOYEX.dwYpos = 0) Then
                Direction = DirectionRightUp
            ElseIf (MYJOYEX.dwXpos = 65535 And MYJOYEX.dwYpos = 65535) Then
                Direction = DirectionRightDown
            ElseIf (MYJOYEX.dwXpos = 0) Then
                Direction = DirectionLeft
            ElseIf (MYJOYEX.dwXpos = 65535) Then
                Direction = DirectionRight
            ElseIf (MYJOYEX.dwYpos = 0) Then
                Direction = DirectionUp
            ElseIf (MYJOYEX.dwYpos = 65535) Then
                Direction = DirectionDown
            Else
                Direction = DirectionNone
            End If
            RaiseEvent Joystick(JoyNum, Direction, lngButton)
    Last edited by joaquim; Sep 16th, 2011 at 04:02 PM.
    VB6 2D Sprite control

    To live is difficult, but we do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width