SetDoubleClickTime Function

Declare Function SetDoubleClickTime Lib "user32.dll" (ByVal wCount As Long) As Long

Platforms: Win 32s, Win 95/98, Win NT

SetDoubleClickTime sets the maximum amount of time allowed between successive mouse clicks for Windows to determine it as a double click. This function alters how Windows interprets a double click, so of course all applications as well as Windows itself will be affected. Be careful using this function, since the user usually sets the double click speed via Windows's Control Panel, so he/she may not expect a change in the double click speed. The function returns 1 if successful, or 0 if an error occured.

wCount
The maximum amount of time, in milliseconds, to allow between successive clicks for Windows to interpret it as a double click. A value of 0 restores Windows's default double click speed of 500 milliseconds.

Example:

' Set the maximum double click speed to 1 second.
Dim retval As Long  ' return value

retval = SetDoubleClickTime(1000)  ' set the double click speed to 1 second
Debug.Print "The double click speed is now 1 second (1000 milliseconds)."

See Also: GetDoubleClickTime
Category: Mouse

Go back to the alphabetical Function listing.
Go back to the Reference section index.


This page is copyright © 2000 Paul Kuliniewicz. Copyright Information.
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/s/setdoubleclicktime.html