Whats the command for Left Click on VB 6.0?
Printable View
Whats the command for Left Click on VB 6.0?
Code:Private Const VK_LEFT = &H25
SendMessage Hwnd, WM_KEYDOWN, VK_LEFT, 0
SendMessage Hwnd, WM_KEYUP, VK_LEFT, 0
Does that Click in the spot the mouse is?
no, that will click on a hwnd
hwnd is?
each form has a hwnd, you can send a message to a form to click. one of these will tell you:
http://www.mentalis.org/apilist/807D...4D80FD3DD.html
http://www.mentalis.org/apilist/5C95...C42DE3334.html
I dont want anything fancy all i want is click, if its not hard to say press z by sayingf SendKeys "z" it shouldnt b hard to do LeftClick...............................
If you dont knwo what i want, i want my MOUSE to click its LEFT button...
You can simulate mouse left click with mouse_event APIQuote:
Originally Posted by SlipKnot
When you want left click just call it like this:VB Code:
Private Declare Sub mouse_event Lib "user32.dll" (ByVal dwflags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long) Private Const MOUSEEVENTF_LEFTDOWN = &H2 Private Const MOUSEEVENTF_LEFTUP = &H4
VB Code:
mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
BTW "yes" that will left click in the spot the mouse is. :wave:
edit **copywrite
same exact thing...
|2eM!x, I don't see constants for cButt and dwEI ?
Should'nt it be:VB Code:
mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0&, 0&, 0&, 0&
yeah ***...stupid allapi-always lying to me
LOL... actually not a bad site.Quote:
Originally Posted by |2eM!x
n'fact I felt a bit sad to hear that they'll be shutting it down.
When will that be? I couldn't find a date, but I did see this. :eek:
Quote:
All other software, source code, tips & tricks, tutorials or information may not be redistributed without written permission of the respective author(s).
http://www.mentalis.org/goodbye/
I checked out this link but couldn’t find a date there either :(
how do i get your code to click on a specific x,y?
wouldnt it be:
mouse_event MOUSEEVENTF_LEFTDOWN, x, y, 0, 0
mouse_event MOUSEEVENTF_LEFTUP, x, y, 0, 0
?
because that isnt working