Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: VB5,VB6,Win98,Win2K
Expertise: Intermediate
Nov 11, 2000



Application Security Testing: An Integral Part of DevOps

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 Long

' 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:

Dim Speed As Long
' note that Speed is passed ByRef
SystemParametersInfo SPI_SETMOUSESPEED, 0, Speed, 0
Print "Mouse speed = " & Speed
Francesco Balena
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date