Results 1 to 5 of 5

Thread: Be need'n some creative programmers here...

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 1999
    Posts
    309

    Post

    Allright,

    Think of any control that has a click event but does not have a doubleclick event...

    I need youz to think of as many possible ways to mimic a double click event for this control...

    have a good one


  2. #2
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386

    Post

    Use the API to get the interval for the double-click (you can set it manually in the mouse control panel applet)
    As soon as there's a click, set a timer to that interval and when that time is passed and there hasn't been clicked again, you know they didn't double-click...

  3. #3
    Guest

    Post

    The 0.2 should be replaced by the click time as specified in the control panel (but i was to lazy to look it up )

    Code:
    Private Sub Command1_Click()
        Static dClick As Double
        If dClick = 0 Then
            'First Click"
            dClick = Timer
        ElseIf dClick + 0.2 > Timer Then
            'Second Click inside timeframe"
            MsgBox "Yeehaa"
            dClick = 0
        Else
            'Second Click outside timeframe"
            dClick = 0
        End If
    End Sub

    ------------------

    Vincent van den Braken
    EMail: [email protected]
    ICQ: 15440110
    Homepage: http://www.azzmodan.demon.nl




  4. #4
    Guest

    Post

    with the first click, start a timer, with a second click, stop the timer, use a timer with a fast interval, and make it increment a counter on every cycle. if the counter is below a certain number, BINGO!.

    ------------------

    Wossname,
    Email me: [email protected]

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 1999
    Posts
    309

    Post

    Azzmodan's looks like the best way to do it..
    But it's a little buggy some of the time..

    Sometimes the double click does not seem to get registered...

    [This message has been edited by Inhumanoid (edited 12-08-1999).]

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