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

SetDoubleClickInfo - Set the double-click rectangle and timeout

Total Hit ( 3380)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


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 SPIF_SENDWININICHANGE = &H2
Const SPIF_UPDATEINIFILE = &H1
Const SPI_SETDOUBLECLICKTIME = 32
Const SPI_SETDOUBLECLKHEIGHT = 30
Const SPI_SETDOUBLECLKWIDTH = 29

' set new values for the double-click area, and the
' time within which the user must click the mouse button
' again to be considered a double-clicl
'
' WIDTH and HEIGHT are the size (in pixels) of the rectangle
' inside which the second click must occur - default is 4 pixels
' TIMEOUT is the timeout (in milliseconds) - default is 500 milliseconds.
' If MAKEPERMANENT is True, then these new values persists among
'  subsequent Windows sessions

Sub SetDoubleClickInfo(ByVal Width As Long, ByVal Height As Long, _
  ByVal Timeout As Long, Optional ByVal MakePermanent As Boolean)
  Dim flags As Long
  
  ' are these changes permanent?
  If MakePermanent Then
    flags = SPIF_SENDWININICHANGE Or SPIF_UPDATEINIFILE
  End If
  
  ' change rectangle size with SystemParametersInfo
  SystemParametersInfo SPI_SETDOUBLECLKWIDTH, Width, ByVal 0&, flags
  SystemParametersInfo SPI_SETDOUBLECLKHEIGHT, Height, ByVal 0&, flags
  ' change timeout
  SystemParametersInfo SPI_SETDOUBLECLICKTIME, Timeout, ByVal 0&, flags
End Sub


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.