VB6 - Simulate Shift+Click and Ctrl+Click-VBForums
Results 1 to 11 of 11

Thread: VB6 - Simulate Shift+Click and Ctrl+Click

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    5

    Question VB6 - Simulate Shift+Click and Ctrl+Click

    I looked everywhere but can not find, how to simulate shift+left mouse click and ctrl+left mouse click?

    anyone know?

    thanks!

  2. #2

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    5

    Exclamation Re: VB6 - Simulate Shift+Click and Ctrl+Click

    This is not possible in Visual Basic 6? I know that is possible in Delphi

    nobody answered?

  3. #3
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: VB6 - Simulate Shift+Click and Ctrl+Click

    What do you mean by "Simulate"? Like how to track it? Or how to change it to make it seem that the Shift and Left mouse click or Ctrl and left mouse click?
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    5

    Re: VB6 - Simulate Shift+Click and Ctrl+Click

    I want something, put a timer on the form with interval 10000, position the cursor on the name of a file and after this interval the VB6 program alone will click automatically shitf + click or control + click selecting other files.

  5. #5
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: VB6 - Simulate Shift+Click and Ctrl+Click

    Hmm.... i dont know about the moving of the cursor, but for the click, you may be able to use GetAsyncKeyStates.
    Like:
    GetAsyncKeyState(2) <> 0 'forcing the left mouse button to register
    GetAsyncKeyState(50)<>0 'forcing the shift/ctrl button to register

    Those are not the actual numbers for them though. You may be able to do that.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  6. #6
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,572

    Re: VB6 - Simulate Shift+Click and Ctrl+Click

    Quote Originally Posted by vbrsoft View Post
    I want something, put a timer on the form with interval 10000, position the cursor on the name of a file and after this interval the VB6 program alone will click automatically shitf + click or control + click selecting other files.
    Why do you want to do that...???

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  7. #7

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    5

    Re: VB6 - Simulate Shift+Click and Ctrl+Click

    To create a simulated mouse and keyboard to complete all the options to send keys and set of keys, We all know how to move the mouse cursor in any direction, giving left click, middle click and right click, but could not find anywhere how to simulate the shift + left click and ctrl + left click, are two types of clicks important, without them a function to simulate mouse is not complete. I hope someone has the answer

  8. #8
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: VB6 - Simulate Shift+Click and Ctrl+Click

    i think u can do the same with the mouse click. u just have to figure out how to move it though. (you can click and mouse with the GetAsyncKeyState)
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  9. #9

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    5

    Re: VB6 - Simulate Shift+Click and Ctrl+Click

    we can simulate the mouse and keyboard, we even send a set of keys, the problem is when we put together an event on the keyboard (shift) and a mouse event (left click) to be simulated at the same time.

  10. #10
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: VB6 - Simulate Shift+Click and Ctrl+Click

    I know. You just do it like this

    Code:
    GetAsyncKeyState('Number for left mouse) <> 0 And GetAsyncKeyState('number for shift or ctrl) <> 0
    That makes them go off.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  11. #11
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,572

    Re: VB6 - Simulate Shift+Click and Ctrl+Click

    Quote Originally Posted by vbrsoft View Post
    we can simulate the mouse and keyboard, we even send a set of keys, the problem is when we put together an event on the keyboard (shift) and a mouse event (left click) to be simulated at the same time.
    How do you simulate..???

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.