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

program don't wait

Status
Not open for further replies.

Lengliz

Programmer
Feb 15, 2005
29
TN
Hi,
i'am using vfp6 with this code:

DO FORM myForm && to get the variable Ccode from user

USE sale_2008
LOCATE FOR Item=Ccode
IF FOUND()
Lfound=.T.
ELSE
Lfound=.F.
ENDIF
USE

The problem is that when runnig the program, the instruction after (DO FORM myForm) USE sale_2008 get executed before (DO FORM...), i have tried WAIT and SLEEP to begin from (DO FORM...) but nothing.

DO FORM myForm
DECLARE Sleep IN Win32API INTEGER
sleep(1000)
USE sale_2008
LOCATE FOR Item=Ccode
IF FOUND()
Lfound=.T.
ELSE
Lfound=.F.
ENDIF
USE

Thank you form help
LENGLIZ
 
You need to get the system to wait for user input while the form is displayed.

There are a couple of ways to to do this, perhaps the one for something like this is to set the form myForm
to be modal - it's a property of the form; windowtype and it needs to be set to 1 - Modal

Good luck.




Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Hi GriffMG,

Thank you very much it works fine !!!

Regards
LENGLIZ
 
No problem, good luck

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top