Skip to content

Code Error

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #190970
    ii Rocky ii
    Member

    what is problem in this code

    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)Pivate Const KEYEVENTF_KEYUP = &H2
    Private Const VK_F9 = &H78
    
    Private Sub Command1_Click()
    Call keybd_event(VK_F9, 0, 0, 0)
    End Sub
    
    Private Sub Command2_Click()
    Call keybd_event(VK_F9, 0, KEYEVENTF_KEYUP, 0)
    end Sub

     

    #190976
    Newbie
    Member

    @ii Rocky ii wrote:

    what is problem in this code

    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)Pivate Const KEYEVENTF_KEYUP = &H2
    Private Const VK_F9 = &H78

    should be

    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
    
    Private Const KEYEVENTF_KEYUP = &H2
    Private Const VK_F9 = &H78

     

    #190975
    ii Rocky ii
    Member

    thx mistake is pivate

    #190974

    double posting should be killed 😆

    #190973
    Admin
    Administrator

    i second that^

    @nanomachine007 wrote:

    double posting should be killed 😆

    #190972
    Sabotage2
    Member

    why double posting willbee killed 😯

    #190971
    Admin
    Administrator

    its a leeched code from planet-source-code.com

    @ii Rocky ii wrote:

    what is problem in this code

        Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)Pivate Const KEYEVENTF_KEYUP = &H2
        Private Const VK_F9 = &H78
    
    Private Sub Command1_Click()
    Call keybd_event(VK_F9, 0, 0, 0)
    End Sub
    
    Private Sub Command2_Click()
    Call keybd_event(VK_F9, 0, KEYEVENTF_KEYUP, 0)
    end Sub

     

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.