Results 1 to 6 of 6

Thread: where can i find a button control with dblclick event?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    81

    where can i find a button control with dblclick event?

    where can i find a button control with dblclick event?

    plz help

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: where can i find a button control with dblclick event?

    You could use VB's option button control, with its style set to graphical.

    The option button has a DblClick event.

  3. #3
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: where can i find a button control with dblclick event?

    why do u need a BUTTON with a DOUBLE-CLICK event???

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    81

    Re: where can i find a button control with dblclick event?

    because in VB6 the commandbutton component has no that event (as I see) and I need that

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: where can i find a button control with dblclick event?

    You could also use either the Image Control or the Picturebox control for a command button. Actually, this is done alot because you can add cool pictures to them.

    Both controls have DblClick events.

  6. #6
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: where can i find a button control with dblclick event?

    I guess you could do this
    VB Code:
    1. Private Sub Command1_Click()
    2. Static lasttime As Single
    3. Dim DeltaTime As Single
    4. Dim CurrTime As Single
    5.  
    6.     CurrTime = Timer
    7.     DeltaTime = CurrTime - lasttime
    8.     If DeltaTime < 0.2 Then
    9.         lasttime = 0
    10.     'do your Double click stuff here
    11.         Debug.Print DeltaTime, "DoubleCLick"
    12.     Else
    13.     'do single click stuff here
    14.         lasttime = CurrTime
    15.  
    16.     End If
    17. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width