Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent multiple mouse clicks

Status
Not open for further replies.

SteveDingle

Programmer
Jul 26, 2004
254
GB
Heya All,

I know I've done this before but mind is blank. Basically I have a process running where I'm using DOEVENTS to check for a "Cancel" button being clicked. The client wants a single button to be the "Start" and "Cancel" button.

The problem is that the user can click multiple times before the "cancel" is registered, between the DOEVENTS, and the button then switches to Start mode. Of course the second click is then picked up and the process starts.

I'm pretty sure I have dealt with this in past just wondering if anyone has any thoughts.

FWIW, I am working on client to change design but they're trying to match an existing layout.

Thanks

Toodles,
Steve Dingle
D&S Business Solutions Ltd
 
Hi Steve,

Does your app have a AutoYield property? If yes, make sure its set to .T., otherwise set the _VFP.AutoYield property to .T.

Regards,
Jim
 
Steve,


You can set the time in "ticks" of the 'Double click" inteval with:

_DBLCLICK = nTicks

I would recommmend something like:

nCurDouble = _DBLCLICK
*
_DBLCLICK = 1

<do whatever on your button>

_DBLCLICK = nCURdOUBLE

to set it back... but this will make the 2nd click must happen extremely exteremly fast... which is virtually impossible to do, but set it back once its done, or you won't be able to double click anything...



Best Regards,
Scott

&quot;Everything should be made as simple as possible, and no simpler.&quot;[hammer]
 
Thanks for the responses guys

Jim, yes I have Autoyield set right.

Scott, sounds like a good plan will give it a shot.

Still hoping client will let me do 2 buttons as it should be

Toodles,
Steve Dingle
D&S Business Solutions Ltd
 
Steve,
Yeah, that really is the best way... maybe do up a mock up screen, and let them see what it would really be like... and show him some other apps that work that way too.


Best Regards,
Scott

&quot;Everything should be made as simple as possible, and no simpler.&quot;[hammer]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top