Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Control the mouse speed under Windows 98 / 2000

Total Hit ( 3607)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


Under Windows 98 and 2000 you can control the speed of the mouse. The mouse speed determines how far the pointer will move based on the distance the mouse moves. The pvParam parameter must point to an integer that receives a value which ranges between 1 (slowest) and 20 (fastest). A value of 10 is the default. The value can be set by an end user using the mouse control panel application or by an application using the SystemParameterInfo API function:

Click here to copy the following block
Private Declare Function SystemParametersInfo Lib "user32" Alias _
  "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, _
  ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
Const SPI_SETMOUSESPEED = 113
Const SPI_GETMOUSESPEED = 112

' modify the mouse speed to make it as fast as possible
Dim Speed As Long
Speed = 20
SystemParametersInfo SPI_SETMOUSESPEED, 0, ByVal Speed, 0

You can retrieve the current mouse speed (so that you can later restore it) using the SPI_GETMOUSESPEED value for the first argument to SystemParameterInfo:

Click here to copy the following block
Dim Speed As Long
' note that Speed is passed ByRef
SystemParametersInfo SPI_SETMOUSESPEED, 0, Speed, 0
Print "Mouse speed = " & Speed


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.