|
-
Aug 9th, 2002, 04:26 PM
#1
Thread Starter
New Member
Determine the Speed and Acceleration settings of the mouse
I am trying to determine the average speed a mouse that is moved on a frame on the form.
Depending on the average speed if the user moves the mouse speeder than the average speed I should display a message about the speed he is using the mouse.
Is this possible in Visual Basic. I am sure this is possible but I am not knowing which function to use. So any help would be greatly appreciated.
Thanking you,
Dinakar Tatineni
-
Aug 10th, 2002, 06:56 PM
#2
Frenzied Member
To get the speed of the mouse, ask the user to move the mouse at a normal speed or something... then make your program test for the position of the mouse twice, with a delay of 100 miliseconds between the two tests (that should be enough). Get the distance between the 2 positions, and then use the general speed formula (Speed = Distance / Time)... that should work 
Do you know about the GetTickCount and the GetCursorPos APIs? You shouldn't rely on the native VB functions, they're not very accurate, try using these functions instead (if you don't know how just search the web there are tons of articles about them and they're not too hard). If you still can't do it by yourself, post here again and I'll help you out...
-
Aug 12th, 2002, 04:07 PM
#3
Thread Starter
New Member
Thank you
Your reply is great. I will work on it
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
|