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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Single vs Double click 1

Status
Not open for further replies.

cdm99

IS-IT--Management
Sep 9, 2005
4
US
I have a program with a main screen that calls subprograms.
I call the subprograms from the Click method of a button on the main screen.
If you single-click on the button, it launches the subprogram.

But if you double-click on the button, the program locks up.
The only way to get out is to Ctrl-Alt-Del, yet the Task Manager says that VFP is running.
I've looked for another window behind the main screen, nothing there.
I can't find a double-click method in the property sheet either.

Any idea what causes this, and how I can control it?
TIA
 
The button indeed has no double-click event, but many other controls have the DblClick event.

The simple way to address the problem is to put This.Enabled=.F. as first line of the click event, then the current code and finally This.Enabled=.T. to prevent double calls of the click event.

Code:
This.Enabled=.F.
DO some.prg
Thes.Enabled=.T.

Bye, Olaf.
 
Thanks Olaf, that's worth a star, very clever!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top