DoubleClick question
I'm building a program using the LinkLabel control and have successfully "wired" several controls to a single sub (sender works just fine). My question is with the speed (or lack of) to responding to a click.
A single click event works just fine. I have a simple piece of code that can detect a double click on a Button (dbltime is global):
Sub Button1_Click
dt = Now - DblTime
If dt < 10000000ThenMsgbox("Double Click")
EndIf
dbltime = Now
End Sub
This code works great on a Button control, but works quite poorly on a LinkLabel control. When you double click rapidly, the second click is apparently not detected. And, of course, if you click too slowly the second click is ignored. If you are persistent and keep trying different clicking speeds, eventually you can get the double click routine to run.
I have attached a demo program so you can see the behavior differences between a Button and a LinkLabel.
Any insights on how to implement an effective double click using a LinkLabel control?
I'm building a program using the LinkLabel control and have successfully "wired" several controls to a single sub (sender works just fine). My question is with the speed (or lack of) to responding to a click.
A single click event works just fine. I have a simple piece of code that can detect a double click on a Button (dbltime is global):
Sub Button1_Click
dt = Now - DblTime
If dt < 10000000ThenMsgbox("Double Click")
EndIf
dbltime = Now
End Sub
This code works great on a Button control, but works quite poorly on a LinkLabel control. When you double click rapidly, the second click is apparently not detected. And, of course, if you click too slowly the second click is ignored. If you are persistent and keep trying different clicking speeds, eventually you can get the double click routine to run.
I have attached a demo program so you can see the behavior differences between a Button and a LinkLabel.
Any insights on how to implement an effective double click using a LinkLabel control?