I looked everywhere but can not find, how to simulate shift+left mouse click and ctrl+left mouse click?
anyone know?
thanks!
Printable View
I looked everywhere but can not find, how to simulate shift+left mouse click and ctrl+left mouse click?
anyone know?
thanks!
This is not possible in Visual Basic 6? I know that is possible in Delphi
nobody answered?
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?
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.
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.
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
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)
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.
I know. You just do it like this
That makes them go off. :)Code:GetAsyncKeyState('Number for left mouse) <> 0 And GetAsyncKeyState('number for shift or ctrl) <> 0