Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello

 

Im trying to create a Tool to create demos / presentations and for this I need to record mousemovements and clicks ( outside of the Form )as well as i need to simulate them.

Recording and replaying the movement already works fine, but I cant figure out how to capture klicks ( maybe mousedown and up on their own ).

Im googling since hours, but all I can find are codesnippets that SHOULD do the Job, but do not :(

 

Anyone here has an Idea how to do this ? Do I have to use DLLs for that ? If yes, HOW do I include a DLL and which one do I need?

 

You may have already recognized that I am still a VB.net beginner and my english is not perfect ;) so plz forgive me if I ask dumb questions and that in a bad english ;)

 

Greetings Sea

Posted

Have you tried this?

 

   Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer

   If GetAsyncKeyState(1) = 0 Then
       'Your Left Mouse Button Is UP
   Else
       'Your Left Mouse Button Is Down
   End If
   
   If GetAsyncKeyState(2) = 0 Then
       'Your Right Mouse Button Is UP
   Else
       'Your Right Mouse Button Is Down
   End If

 

http://msdn.microsoft.com/en-us/library/ms646293.aspx

 

(Not positive on the VB.NET dll import syntax)

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...