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

Form not holding when called by program call ?? 1

Status
Not open for further replies.

TerryUrb

Programmer
Oct 3, 2005
40
CA
I have an entry form which gives the details of the program it is about to run. On the form I have one button "Press to Continue". On mouse click or any key, it releases (return)when I run the form by itself. However, when I call the form from my "main" program, it displays the form, but is not held there in the form and my program carries on. If I do a read cycle after the form has been created, it leaves the command button on the form active, which will release when any key or mouse is selected. I have to then do "release windows" to release the form. It actually does what it is suppose to do, but I should be able to have the form do it. What am I doing incorrectly? How do I get the program to wait in the command window. I have tried 'read cycle' but still it does not work properly.
Help would be appreciated.
 
Hi Terry,

You need to execute READ EVENTS immediately after you launch the form (not READ CYCLE). That will tell VFP to keep the form active on the screen while the user interacts with it.

You also need to execute CLEAR EVENTS when you want to close the form. You normally do this either in the click event of a "Close" button, or in the form's Destroy event.

The CLEAR EVENTS will transfer control to the line of code following the READ EVENTS.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thank you very much, that worked just GREAT!
Best wishes,
Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top