|
-
Sep 16th, 2009, 07:29 PM
#1
Thread Starter
Banned
Mouseeventf_
Is there a "MOUSEEVENTF_Click"?
Also,
How would I change this code so that it will click when I move/click my mouse wheel?
Code:
If MOUSEEVENTF_WHEEL Then
Call mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
Call mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
End If
EDIT:
How would I move the mouse down? Like -10, -10 pixels? or something like that.
Last edited by Iamazn; Sep 16th, 2009 at 07:38 PM.
-
Sep 16th, 2009, 08:06 PM
#2
Re: Mouseeventf_
vb Code:
Private Sub Form1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseClick
if e.Button = Windows.Forms.MouseButtons.Middle Then
msgbox ("Middle btn was clicked")
End if
End Sub
Kris
-
Sep 16th, 2009, 08:07 PM
#3
Re: Mouseeventf_
and what do u mean by:
"How would I move the mouse down? Like -10, -10 pixels? or something like that."
Kris
-
Sep 16th, 2009, 08:20 PM
#4
Thread Starter
Banned
Re: Mouseeventf_
 Originally Posted by i00
and what do u mean by:
"How would I move the mouse down? Like -10, -10 pixels? or something like that."
Kris
So when I click the mouse, it will be auto moved down a tiny bit
Also, how would I change this so that it will work even if form isnt in focus
Code:
If e.Button = Windows.Forms.MouseButtons.Left Then
Call mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
Call mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
Call mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
Call mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
End If
Last edited by Iamazn; Sep 16th, 2009 at 08:23 PM.
-
Sep 16th, 2009, 09:34 PM
#5
Thread Starter
Banned
Re: Mouseeventf_
Sorry for Double post but when I use this code, after I click my mouse button, the 2nd click isnt sent thru.
Code:
If m.Msg = WM_HOTKEY Then
Dim id As IntPtr = m.WParam
Select Case (id.ToString)
Case "9"
If MOUSEEVENTF_LEFTDOWN Then
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
End If
End Select
End If
MyBase.WndProc(m)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|