Results 1 to 12 of 12

Thread: [VB6] - api messages const

  1. #1

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

    [VB6] - api messages const

    can anyone give me the complet list of api messages const?(with some information that whay is)
    i need some message that i don't know here const
    i know the move message, but i don't know the joystick message(for example)... can anyone give me that list?
    thanks
    VB6 2D Sprite control

    To live is difficult, but we do it.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] - api messages const

    There is no complete list that I know of. Suggest using the API Viewer located here. Appears to not have been updated since late 2008. However, the list of constants is quite impressive. For any constants you don't find, you can always google for them or try to find their value on MSDN
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    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
    There is no complete list that I know of. Suggest using the API Viewer located here. Appears to not have been updated since late 2008. However, the list of constants is quite impressive. For any constants you don't find, you can always google for them or try to find their value on MSDN
    thanks for these. but i can't find the joystick message const. can you help me(if exist)?
    VB6 2D Sprite control

    To live is difficult, but we do it.

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] - api messages const

    Can you describe this better? What APIs use that constant; that could be helpful

    Otherwise, that app I linked you to has a search function. When I searched for constants that contained the letters JOY, it gave me these results:
    Code:
    Private Const DIPROP_JOYSTICKID As Long = MAKEDIPROP(15)
    Private Const JOY_BUTTON1 As Long = &H1
    Private Const JOY_BUTTON10 As Long = &H200&
    Private Const JOY_BUTTON11 As Long = &H400&
    Private Const JOY_BUTTON12 As Long = &H800&
    Private Const JOY_BUTTON13 As Long = &H1000&
    Private Const JOY_BUTTON14 As Long = &H2000&
    Private Const JOY_BUTTON15 As Long = &H4000&
    Private Const JOY_BUTTON16 As Long = &H8000&
    Private Const JOY_BUTTON17 As Long = &H10000
    Private Const JOY_BUTTON18 As Long = &H20000
    Private Const JOY_BUTTON19 As Long = &H40000
    Private Const JOY_BUTTON1CHG As Long = &H100
    Private Const JOY_BUTTON2 As Long = &H2
    Private Const JOY_BUTTON20 As Long = &H80000
    Private Const JOY_BUTTON21 As Long = &H100000
    Private Const JOY_BUTTON22 As Long = &H200000
    Private Const JOY_BUTTON23 As Long = &H400000
    Private Const JOY_BUTTON24 As Long = &H800000
    Private Const JOY_BUTTON25 As Long = &H1000000
    Private Const JOY_BUTTON26 As Long = &H2000000
    Private Const JOY_BUTTON27 As Long = &H4000000
    Private Const JOY_BUTTON28 As Long = &H8000000
    Private Const JOY_BUTTON29 As Long = &H10000000
    Private Const JOY_BUTTON2CHG As Long = &H200
    Private Const JOY_BUTTON3 As Long = &H4
    Private Const JOY_BUTTON30 As Long = &H20000000
    Private Const JOY_BUTTON31 As Long = &H40000000
    Private Const JOY_BUTTON32 As Long = &H80000000
    Private Const JOY_BUTTON3CHG As Long = &H400
    Private Const JOY_BUTTON4 As Long = &H8
    Private Const JOY_BUTTON4CHG As Long = &H800
    Private Const JOY_BUTTON5 As Long = &H10&
    Private Const JOY_BUTTON6 As Long = &H20&
    Private Const JOY_BUTTON7 As Long = &H40&
    Private Const JOY_BUTTON8 As Long = &H80&
    Private Const JOY_BUTTON9 As Long = &H100&
    Private Const JOY_CAL_READ3 As Long = &H40000
    Private Const JOY_CAL_READ4 As Long = &H80000
    Private Const JOY_CAL_READ5 As Long = &H400000
    Private Const JOY_CAL_READ6 As Long = &H800000
    Private Const JOY_CAL_READALWAYS As Long = &H10000
    Private Const JOY_CAL_READRONLY As Long = &H2000000
    Private Const JOY_CAL_READUONLY As Long = &H4000000
    Private Const JOY_CAL_READVONLY As Long = &H8000000
    Private Const JOY_CAL_READXONLY As Long = &H100000
    Private Const JOY_CAL_READXYONLY As Long = &H20000
    Private Const JOY_CAL_READYONLY As Long = &H200000
    Private Const JOY_CAL_READZONLY As Long = &H1000000
    Private Const JOY_HW_2A_2B_GENERIC As Long = 2
    Private Const JOY_HW_2A_4B_GENERIC As Long = 3
    Private Const JOY_HW_2B_FLIGHTYOKE As Long = 5
    Private Const JOY_HW_2B_FLIGHTYOKETHROTTLE As Long = 6
    Private Const JOY_HW_2B_GAMEPAD As Long = 4
    Private Const JOY_HW_3A_2B_GENERIC As Long = 7
    Private Const JOY_HW_3A_4B_GENERIC As Long = 8
    Private Const JOY_HW_4B_FLIGHTYOKE As Long = 10
    Private Const JOY_HW_4B_FLIGHTYOKETHROTTLE As Long = 11
    Private Const JOY_HW_4B_GAMEPAD As Long = 9
    Private Const JOY_HW_CUSTOM As Long = 1
    Private Const JOY_HW_LASTENTRY As Long = 13
    Private Const JOY_HW_NONE As Long = 0
    Private Const JOY_HW_TWO_2A_2B_WITH_Y As Long = 12
    Private Const JOY_HWS_AUTOLOAD As Long = &H10000000
    Private Const JOY_HWS_GAMEPORTBUSBUSY As Long = &H1
    Private Const JOY_HWS_HASPOV As Long = &H2
    Private Const JOY_HWS_HASR As Long = &H80000
    Private Const JOY_HWS_HASU As Long = &H800000
    Private Const JOY_HWS_HASV As Long = &H1000000
    Private Const JOY_HWS_HASZ As Long = &H1
    Private Const JOY_HWS_ISANALOGPORTDRIVER As Long = &H8000000
    Private Const JOY_HWS_ISCARCTRL As Long = &H40
    Private Const JOY_HWS_ISGAMEPAD As Long = &H20
    Private Const JOY_HWS_ISGAMEPORTBUS As Long = &H80000000
    Private Const JOY_HWS_ISGAMEPORTDRIVER As Long = &H4000000
    Private Const JOY_HWS_ISHEADTRACKER As Long = &H2000000
    Private Const JOY_HWS_ISYOKE As Long = &H10
    Private Const JOY_HWS_NODEVNODE As Long = &H20000000
    Private Const JOY_HWS_POVISBUTTONCOMBOS As Long = &H4
    Private Const JOY_HWS_POVISJ1X As Long = &H10000
    Private Const JOY_HWS_POVISJ1Y As Long = &H20000
    Private Const JOY_HWS_POVISJ2X As Long = &H40000
    Private Const JOY_HWS_POVISPOLL As Long = &H8
    Private Const JOY_HWS_RISJ1X As Long = &H100000
    Private Const JOY_HWS_RISJ1Y As Long = &H200000
    Private Const JOY_HWS_RISJ2Y As Long = &H400000
    Private Const JOY_HWS_XISJ1Y As Long = &H80
    Private Const JOY_HWS_XISJ2X As Long = &H100
    Private Const JOY_HWS_XISJ2Y As Long = &H200
    Private Const JOY_HWS_YISJ1X As Long = &H400
    Private Const JOY_HWS_YISJ2X As Long = &H800
    Private Const JOY_HWS_YISJ2Y As Long = &H1000
    Private Const JOY_HWS_ZISJ1X As Long = &H2000
    Private Const JOY_HWS_ZISJ1Y As Long = &H4000
    Private Const JOY_HWS_ZISJ2X As Long = &H8000
    Private Const JOY_ISCAL_POV As Long = &H20
    Private Const JOY_ISCAL_R As Long = &H4
    Private Const JOY_ISCAL_U As Long = &H8
    Private Const JOY_ISCAL_V As Long = &H10
    Private Const JOY_ISCAL_XY As Long = &H1
    Private Const JOY_ISCAL_Z As Long = &H2
    Private Const JOY_OEMPOLL_PASSDRIVERDATA As Long = 7
    Private Const JOY_PASSDRIVERDATA As Long = &H10000000
    Private Const JOY_POV_NUMDIRS As Long = 4
    Private Const JOY_POVBACKWARD As Long = 18000
    Private Const JOY_POVCENTERED As Long = -1
    Private Const JOY_POVFORWARD As Long = 0
    Private Const JOY_POVLEFT As Long = 27000
    Private Const JOY_POVRIGHT As Long = 9000
    Private Const JOY_POVVAL_BACKWARD As Long = 1
    Private Const JOY_POVVAL_FORWARD As Long = 0
    Private Const JOY_POVVAL_LEFT As Long = 2
    Private Const JOY_POVVAL_RIGHT As Long = 3
    Private Const JOY_RETURNALL As Long = (JOY_RETURNX Or JOY_RETURNY Or JOY_RETURNZ Or JOY_RETURNR Or JOY_RETURNU Or JOY_RETURNV Or JOY_RETURNPOV Or JOY_RETURNBUTTONS)
    Private Const JOY_RETURNBUTTONS As Long = &H80&
    Private Const JOY_RETURNCENTERED As Long = &H400&
    Private Const JOY_RETURNPOV As Long = &H40&
    Private Const JOY_RETURNPOVCTS As Long = &H200&
    Private Const JOY_RETURNR As Long = &H8&
    Private Const JOY_RETURNRAWDATA As Long = &H100&
    Private Const JOY_RETURNU As Long = &H10
    Private Const JOY_RETURNV As Long = &H20
    Private Const JOY_RETURNX As Long = &H1&
    Private Const JOY_RETURNY As Long = &H2&
    Private Const JOY_RETURNZ As Long = &H4&
    Private Const JOY_US_HASRUDDER As Long = &H1
    Private Const JOY_US_ISOEM As Long = &H4
    Private Const JOY_US_PRESENT As Long = &H2
    Private Const JOY_US_RESERVED As Long = &H80000000
    Private Const JOY_US_VOLATILE As Long = &H8&
    Private Const JOY_USEDEADZONE As Long = &H800&
    Private Const JOYCAPS_HASPOV As Long = &H10
    Private Const JOYCAPS_HASR As Long = &H2
    Private Const JOYCAPS_HASU As Long = &H4
    Private Const JOYCAPS_HASV As Long = &H8
    Private Const JOYCAPS_HASZ As Long = &H1
    Private Const JOYCAPS_POV4DIR As Long = &H20
    Private Const JOYCAPS_POVCTS As Long = &H40
    Private Const JOYERR_BASE As Long = 160
    Private Const JOYERR_NOCANDO As Long = (JOYERR_BASE + 6)
    Private Const JOYERR_NOERROR As Long = (0)
    Private Const JOYERR_PARMS As Long = (JOYERR_BASE + 5)
    Private Const JOYERR_UNPLUGGED As Long = (JOYERR_BASE + 7)
    Private Const JOYSTICKID1 As Long = 0
    Private Const JOYSTICKID2 As Long = 1
    Private Const JOYTYPE_DEFAULTPROPSHEET As Long = &H80000000
    Private Const JOYTYPE_NOAUTODETECTGAMEPORT As Long = &H2
    Private Const JOYTYPE_NOHIDDIRECT As Long = &H4
    Private Const JOYTYPE_ZEROGAMEENUMOEMDATA As Long = &H1
    Private Const MAX_JOYSTICKOEMVXDNAME As Long = 260
    Private Const MAX_JOYSTRING As Long = 256
    Private Const MM_AMD_INTERWAVE_JOYSTICK As Long = 6
    Private Const MM_CRYSTAL_SOUND_FUSION_JOYSTICK As Long = 26
    Private Const MM_DIMD_VIRTJOY As Long = 4
    Private Const MM_JOY1BUTTONDOWN As Long = &H3B5
    Private Const MM_JOY1BUTTONUP As Long = &H3B7
    Private Const MM_JOY1MOVE As Long = &H3A0
    Private Const MM_JOY1ZMOVE As Long = &H3A2
    Private Const MM_JOY2BUTTONDOWN As Long = &H3B6
    Private Const MM_JOY2BUTTONUP As Long = &H3B8
    Private Const MM_JOY2MOVE As Long = &H3A1
    Private Const MM_JOY2ZMOVE As Long = &H3A3
    Private Const MM_NEC_JOYSTICK As Long = 12
    Private Const MM_OLIVETTI_JOYSTICK As Long = 8
    Private Const MM_PC_JOYSTICK As Long = 12
    Private Const MM_WORKBIT_JOYSTICK As Long = 8
    Private Const MM_YAMAHA_OPL3SA_JOYSTICK As Long = &H18
    Private Const REGSTR_KEY_JOYCURR As String = "CurrentJoystickSettings"
    Private Const REGSTR_KEY_JOYSETTINGS As String = "JoystickSettings"
    Private Const REGSTR_PATH_JOYCONFIG As String = REGSTR_PATH_MEDIARESOURCES ("\Joystick")
    Private Const REGSTR_PATH_JOYOEM As String = REGSTR_PATH_PRIVATEPROPERTIES ("\Joystick\OEM")
    Private Const REGSTR_VAL_JOYCALLOUT As String = ("JoystickCallout")
    Private Const REGSTR_VAL_JOYNCONFIG As String = ("Joystick%dConfiguration")
    Private Const REGSTR_VAL_JOYNOEMCALLOUT As String = ("Joystick%dOEMCallout")
    Private Const REGSTR_VAL_JOYNOEMNAME As String = ("Joystick%dOEMName")
    Private Const REGSTR_VAL_JOYOEMCAL1 As String = ("OEMCal1")
    Private Const REGSTR_VAL_JOYOEMCAL10 As String = ("OEMCal10")
    Private Const REGSTR_VAL_JOYOEMCAL11 As String = ("OEMCal11")
    Private Const REGSTR_VAL_JOYOEMCAL12 As String = ("OEMCal12")
    Private Const REGSTR_VAL_JOYOEMCAL2 As String = ("OEMCal2")
    Private Const REGSTR_VAL_JOYOEMCAL3 As String = ("OEMCal3")
    Private Const REGSTR_VAL_JOYOEMCAL4 As String = ("OEMCal4")
    Private Const REGSTR_VAL_JOYOEMCAL5 As String = ("OEMCal5")
    Private Const REGSTR_VAL_JOYOEMCAL6 As String = ("OEMCal6")
    Private Const REGSTR_VAL_JOYOEMCAL7 As String = ("OEMCal7")
    Private Const REGSTR_VAL_JOYOEMCAL8 As String = ("OEMCal8")
    Private Const REGSTR_VAL_JOYOEMCAL9 As String = ("OEMCal9")
    Private Const REGSTR_VAL_JOYOEMCALCAP As String = ("OEMCalCap")
    Private Const REGSTR_VAL_JOYOEMCALLOUT As String = ("OEMCallout")
    Private Const REGSTR_VAL_JOYOEMCALWINCAP As String = ("OEMCalWinCap")
    Private Const REGSTR_VAL_JOYOEMDATA As String = ("OEMData")
    Private Const REGSTR_VAL_JOYOEMNAME As String = ("OEMName")
    Private Const REGSTR_VAL_JOYOEMPOVLABEL As String = ("OEMPOVLabel")
    Private Const REGSTR_VAL_JOYOEMRLABEL As String = ("OEMRLabel")
    Private Const REGSTR_VAL_JOYOEMTESTBUTTONCAP As String = ("OEMTestButtonCap")
    Private Const REGSTR_VAL_JOYOEMTESTBUTTONDESC As String = ("OEMTestButtonDesc")
    Private Const REGSTR_VAL_JOYOEMTESTMOVECAP As String = ("OEMTestMoveCap")
    Private Const REGSTR_VAL_JOYOEMTESTMOVEDESC As String = ("OEMTestMoveDesc")
    Private Const REGSTR_VAL_JOYOEMTESTWINCAP As String = ("OEMTestWinCap")
    Private Const REGSTR_VAL_JOYOEMULABEL As String = ("OEMULabel")
    Private Const REGSTR_VAL_JOYOEMVLABEL As String = ("OEMVLabel")
    Private Const REGSTR_VAL_JOYOEMXYLABEL As String = ("OEMXYLabel")
    Private Const REGSTR_VAL_JOYOEMZLABEL As String = ("OEMZLabel")
    Private Const REGSTR_VAL_JOYUSERVALUES As String = ("JoystickUserValues")
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #5
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: [VB6] - api messages const

    From http://www.google.com/url?q=http://s...cprki0jWV2lOwg

    Code:
    Option Explicit
    
    Public Const JOY_BUTTON1 = &H1
    Public Const JOY_BUTTON2 = &H2
    Public Const JOY_BUTTON3 = &H4
    Public Const JOY_BUTTON4 = &H8
    Public Const JOY_BUTTON5 = &H10&
    Public Const JOY_BUTTON6 = &H20&
    Public Const JOY_BUTTON7 = &H40&
    Public Const JOY_BUTTON8 = &H80&
    Public Const JOY_BUTTON9 = &H100&
    Public Const JOY_BUTTON10 = &H200&
    Public Const JOY_BUTTON11 = &H400&
    Public Const JOY_BUTTON12 = &H800&
    Public Const JOY_BUTTON13 = &H1000&
    Public Const JOY_BUTTON14 = &H2000&
    Public Const JOY_BUTTON15 = &H4000&
    Public Const JOY_BUTTON16 = &H8000&
    Public Const JOY_BUTTON17 = &H10000
    Public Const JOY_BUTTON18 = &H20000
    Public Const JOY_BUTTON19 = &H40000
    Public Const JOY_BUTTON20 = &H80000
    Public Const JOY_BUTTON21 = &H100000
    Public Const JOY_BUTTON22 = &H200000
    Public Const JOY_BUTTON23 = &H400000
    Public Const JOY_BUTTON24 = &H800000
    Public Const JOY_BUTTON25 = &H1000000
    Public Const JOY_BUTTON26 = &H2000000
    Public Const JOY_BUTTON27 = &H4000000
    Public Const JOY_BUTTON28 = &H8000000
    Public Const JOY_BUTTON29 = &H10000000
    Public Const JOY_BUTTON30 = &H20000000
    Public Const JOY_BUTTON31 = &H40000000
    Public Const JOY_BUTTON32 = &H80000000
    Public Const JOY_BUTTON1CHG = &H100
    Public Const JOY_BUTTON2CHG = &H200
    Public Const JOY_BUTTON3CHG = &H400
    Public Const JOY_BUTTON4CHG = &H800
    Public Const JOY_CAL_READ3 = &H40000
    Public Const JOY_CAL_READ4 = &H80000
    Public Const JOY_CAL_READ5 = &H400000
    Public Const JOY_CAL_READ6 = &H800000
    Public Const JOY_CAL_READALWAYS = &H10000
    Public Const JOY_CAL_READRONLY = &H2000000
    Public Const JOY_CAL_READUONLY = &H4000000
    Public Const JOY_CAL_READVONLY = &H8000000
    Public Const JOY_CAL_READXONLY = &H100000
    Public Const JOY_CAL_READXYONLY = &H20000
    Public Const JOY_CAL_READYONLY = &H200000
    Public Const JOY_CAL_READZONLY = &H1000000
    Public Const JOY_POVBACKWARD = 18000
    Public Const JOY_POVCENTERED = -1
    Public Const JOY_POVFORWARD = 0
    Public Const JOY_POVLEFT = 27000
    Public Const JOY_POVRIGHT = 9000
    Public Const JOY_RETURNBUTTONS = &H80&
    Public Const JOY_RETURNCENTERED = &H400&
    Public Const JOY_RETURNPOV = &H40&
    Public Const JOY_RETURNPOVCTS = &H200&
    Public Const JOY_RETURNR = &H8&
    Public Const JOY_RETURNRAWDATA = &H100&
    Public Const JOY_RETURNU = &H10                             '  axis 5
    Public Const JOY_RETURNV = &H20                             '  axis 6
    Public Const JOY_RETURNX = &H1&
    Public Const JOY_RETURNY = &H2&
    Public Const JOY_RETURNZ = &H4&
    Public Const JOY_RETURNALL = (JOY_RETURNX Or JOY_RETURNY Or JOY_RETURNZ Or JOY_RETURNR Or JOY_RETURNU Or JOY_RETURNV Or JOY_RETURNPOV Or JOY_RETURNBUTTONS)
    Public Const JOY_USEDEADZONE = &H800&
    Public Const JOYERR_BASE = 160
    Public Const JOYERR_NOCANDO = (JOYERR_BASE + 6) '  request not completed
    Public Const JOYERR_NOERROR = (0)  '  no error
    Public Const JOYERR_PARMS = (JOYERR_BASE + 5) '  bad parameters
    Public Const JOYERR_UNPLUGGED = (JOYERR_BASE + 7) '  joystick is unplugged
    Public Const JOYSTICKID1 = 0
    Public Const JOYSTICKID2 = 1
    
    Public Const MAXPNAMELEN = 32  '  max product name length (including NULL)
    Public Const MAX_JOYSTICKOEMVXDNAME = 260
    
    Public Type JOYCAPS
            wMid As Integer
            wPid As Integer
            szPname As String * MAXPNAMELEN
            wXmin As Integer
            wXmax As Integer
            wYmin As Integer
            wYmax As Integer
            wZmin As Integer
            wZmax As Integer
            wNumButtons As Integer
            wPeriodMin As Integer
            wPeriodMax As Integer
            'wRmin As Integer
            'wRmax As Integer
            'wUmin As Integer
            'wUmax As Integer
            'wVmin As Integer
            'wVmax As Integer
            'wCaps As Integer
            'wMaxAxes As Integer
            'wNumAxes As Integer
            'wMaxButtons As Integer
            'szRegKey As String * MAXPNAMELEN
            'szOEMVxD As String * MAX_JOYSTICKOEMVXDNAME
    End Type
    
    Public Type JOYINFO
            wXpos As Long
            wYpos As Long
            wZpos As Long
            wButtons As Long
    End Type
    
    Public Type JOYINFOEX
            dwSize As Long                 '  size of structure
            dwFlags As Long                 '  flags to indicate what to return
            dwXpos As Long                '  x position
            dwYpos As Long                '  y position
            dwZpos As Long                '  z position
            dwRpos As Long                 '  rudder/4th axis position
            dwUpos As Long                 '  5th axis position
            dwVpos As Long                 '  6th axis position
            dwButtons As Long             '  button states
            dwButtonNumber As Long        '  current button number pressed
            dwPOV As Long                 '  point of view state
            dwReserved1 As Long                 '  reserved for communication between winmm driver
            dwReserved2 As Long                 '  reserved for future expansion
    End Type
    
    Public Declare Function joyGetDevCaps Lib "winmm.dll" Alias "joyGetDevCapsA" (ByVal id As Long, lpCaps As JOYCAPS, ByVal uSize As Long) As Long
    Public Declare Function joyGetNumDevs Lib "winmm.dll" () As Long
    Public Declare Function joyGetPos Lib "winmm.dll" (ByVal uJoyID As Long, pji As JOYINFO) As Long
    Public Declare Function joyGetPosEx Lib "winmm.dll" (ByVal uJoyID As Long, pji As JOYINFOEX) As Long
    Public Declare Function joyGetThreshold Lib "winmm.dll" (ByVal id As Long, lpuThreshold As Long) As Long
    Public Declare Function joyReleaseCapture Lib "winmm.dll" (ByVal id As Long) As Long
    Public Declare Function joySetCapture Lib "winmm.dll" (ByVal hwnd As Long, ByVal uID As Long, ByVal uPeriod As Long, ByVal bChanged As Long) As Long
    Public Declare Function joySetThreshold Lib "winmm.dll" (ByVal id As Long, ByVal uThreshold As Long) As Long
    EDIT: I see LaVolpe beat me to it !!

  6. #6

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

    Re: [VB6] - api messages const

    is for these sub:
    Code:
    .........
    Public Function MyWndProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
        Dim hdc         As Long
        Dim ps          As PAINTSTRUCT
        
        'Call the default window procedure.
        MyWndProc = DefWindowProc(hwnd, uMsg, wParam, lParam)
        If uMsg = WM_PAINT Then
            'When we receive the WM_PAINT message, repaint the entire window.
            hdc = GetDC(hwnd)
            DrawWin hdc, hwnd
            ReleaseDC hwnd, hdc
        End If
        
        If uMsg = WM_LBUTTONUP Then
            'When you click the left mouse button, the "click !" message will be shown.
            MsgBox "click !", vbOKOnly
        End If
        If uMsg = WM_MOVE Then Debug.Print "move"
    End Function
    .........
    i need 1 const in these way: if umsg=joystickconst then something
    thanks to both
    VB6 2D Sprite control

    To live is difficult, but we do it.

  7. #7
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] - api messages const

    I have never coded for joysticks, so no experience to help you.

    You might want to search this forum & google using keywords like: joystick vb6
    Here are two links to get you started, but I think you'll have to do some more research:
    1. Wiki. Has sample code at bottom of page
    2. Simple tutorial
    3. Here's MSDN's Uisng Joysticks documentation

    I think you may have more luck searching for examples that use the joySetCapture API
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  8. #8

    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
    I have never coded for joysticks, so no experience to help you.

    You might want to search this forum & google using keywords like: joystick vb6
    Here are two links to get you started, but I think you'll have to do some more research:
    1. Wiki. Has sample code at bottom of page
    2. Simple tutorial
    3. Here's MSDN's Uisng Joysticks documentation

    I think you may have more luck searching for examples that use the joySetCapture API
    what i need is detect an action from joystick(any action).. nothing more(in these part)... i want these for avoid the timer
    VB6 2D Sprite control

    To live is difficult, but we do it.

  9. #9
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] - api messages const

    Quote Originally Posted by joaquim View Post
    what i need is detect an action from joystick(any action).. nothing more(in these part)... i want these for avoid the timer
    joySetCapture API is probably the answer then
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  10. #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.

  11. #11
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: [VB6] - api messages const

    I can't give you any advice. As I said earlier, I have never coded for a joystick; nor do I own one.

    Maybe others with experience will give you some advice
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  12. #12

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

    Re: [VB6] - api messages const

    exist the Drop controls API message?
    Last edited by joaquim; Apr 18th, 2012 at 12:35 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