Object with single and double click

please help me out...

Heya guys...

hope you're all going great!!

Please can somebody help me with this...

I want to make a button that makes my mp3 player play with a single click and stop with a double click.

I have no idea how to use Function OnControl(lType, lCode) ... can it even do what I want it to?

I'm trying this ...

Function OnControl(lType, lCode)

If lType = 2 And lCode = 0x0203
blah blah blah blah

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

typing 0x0203 etc causes an error ... but i can't get anything right ...

but yeah ... i want single and double click on the same button one way or another.
Please please please help!!!

Thanks a million

2,015 views 1 replies
Reply #1 Top
I'm sure this has been tackled before by people, but the first idea that comes to my head is:

Dim clicked_once

Sub Object_OnLButtonUp(x,y,dragged)
If clicked_once = False then
clicked_once = True
Object.SetTimer 1,length_of_time_for_second_click
Else
clicked_once = False
Object.KillTimer 1
'do double click stuff
End If
End Sub

Sub Object_OnTimer1
clicked_once = False
Object.KillTimer 1
End Sub

*Code in theory*