VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Creates 'DblClick' event for a 'CommandButton' control

by Chris Onyishi (2 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 27th December 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Creates 'DblClick' event for a 'CommandButton' control

Rate Creates 'DblClick' event for a 'CommandButton' control



' called "DoubleClickTimer" with interval property set at 500 and disabled.
' Drop a "commandButton" called "cmdSave" and labelled "Save" on the form.
' Add the following code in the click event of the "CommandButton" and that of 
' the DoubleClickTimer

Private Sub cmdSave_Click()
 DoubleClick = DoubleClick + 1
 If DoubleClick < 2 Then
    DoubleClickTimer.Enabled = True
    Exit Sub
 End If
 DoubleClick = 0
 DoubleClickTimer.Enabled = False

' Enter Statements You want to execute when You double click on the 
' CommandButton 
' Note that U can use the invterval property of the Timer to control the rate 
' of double clicking

End Sub
_______________________________________________________________________________

Private Sub DoubleClickTimer_Timer()
  DoubleClick = 0
End Sub

Download this snippet    Add to My Saved Code

Creates 'DblClick' event for a 'CommandButton' control Comments

No comments have been posted about Creates 'DblClick' event for a 'CommandButton' control. Why not be the first to post a comment about Creates 'DblClick' event for a 'CommandButton' control.

Post your comment

Subject:
Message:
0/1000 characters