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

Creating a form with buttons to work as a menu

Status
Not open for further replies.

michel392

Programmer
Dec 17, 2001
54
BR
I do not like to create the classic Visual FoxPro menu model in my applications. Instead I use the following FORM with Buttons as the main menu in applications:

|==============| |==============|
Record Exit
new program
customer
|==============| |==============|

Properties in buttons:
User Procedure: User Procedure:
THISFORM.Hide THISFORM.Release
DO RecCust.PRG RETURN TO MASTER


If I click on the "Record new customer" button, the program (RecCust.PRG) to record a new customer is executed in a new windows correctly. But when I finish recording new customers, the program executes a RETURN command in it, but
it did not return to the Form showed above (used as the main application menu) that called it: instead it quits the application. I want the Form above to be showed again, without having to restart the application.

Thank you very much,
Michel


 
Is your Main Form MODAL? If it isn't, do you have a READ EVENTS in your Main .PRG?
After:
Code:
THISFORM.Hide
DO RecCust.PRG
Add:
Code:
THISFORM.SHOW()

Rick

 
Don't use "RETURN TO MASTER"...just put RETURN.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top