devxlogo

Control the mouse speed under Windows 98 / 2000

Control the mouse speed under Windows 98 / 2000

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:

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 LongConst SPI_SETMOUSESPEED = 113Const SPI_GETMOUSESPEED = 112' modify the mouse speed to make it as fast as possibleDim Speed As LongSpeed = 20SystemParametersInfo 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:

Dim Speed As Long' note that Speed is passed ByRefSystemParametersInfo SPI_SETMOUSESPEED, 0, Speed, 0Print "Mouse speed = " & Speed

See also  5 Strategies for Supercharging Your CRM
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist