I'm looking for a button that when I push the button and hold that button some kind of timer or volume will in- / decrease for aslong as I hold that button.
Who can help me?
[Edited by x-shooter on 22-02-2005 at 08:19 PM GMT]
22-02-2005 at 07:56 PM
|
Goran Level: Moderator Registered: 16-05-2002 Posts: 1681
Re: repeat/hold button?
In Command1_Mouse_Down() event start the timer, and in Comman1_Mouse_Up event calculate the time elapsed.
____________________________
If you find the answer helpful, please mark this topic as solved.
22-02-2005 at 10:03 PM
|
humberto Level: VB Lord Registered: 13-01-2005 Posts: 246
Re: repeat/hold button?
dim d%
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Dim t#
Static a%
d = True
Do While d
a = a + 1
Text3 = a
t = Timer
Do While Timer - t < 0.25
DoEvents
Loop
Loop
End Sub
Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As
Single, Y As Single)
d = False
End Sub