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

Want to return to a screen menu when exiting a form 4

Status
Not open for further replies.

Phil Thoms

Programmer
Oct 31, 2005
245
GB
When exiting a form I want to return to the screen menu that called the form, is there a way to accomplish this ?
The screen menu I have was written in FoxPro 2.6 and I am now running in VFP 6.0. The menu calls the form without any problems but I would like to return to the calling menu if possible. Thanks.
 
Return to the menu" may be some specialty in Foxpro 2.6, I don't understand wat you mean with that.

In VFP you create a menu, then generate menu code as a prg and run that. A menu is put to the _screen and will remain there as long as you don't call another menu.

I actually think that hasn't changed much.

And that's not the only way you can do it. If you'd use VFP9 you could use the oop menu from the VFPX project at codeplex, which enables you to use the system standard menus especially within forms.

Bye, Olaf.
 
Philthoms,

What do you mean by a "screen menu"? In VFP, when we talk about menus, we generally mean the set of pull-down menus just under the main screen's title bar. Is that what you are using?

If not, it would pay you to take a few minutes to learn your way round the VFP menu designer. It's not as intuitive as the form and class designers, but not that difficult either.

Once you've designed your menu, you have to generate it (which you do from within the designer). This produces an MPR file that you run just like a program.

If you do that at the beginning of your application (and remember to put READ EVENTS just after the line that launches the menu), then the menu will remain on the screen until you close the app. Your users will be able to access it at any time (except when a modal form is active), which is usually what you want.

Hope this makes sense. If I've misunderstood your question, perhaps you could clarify it.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
So, what you want is a Windows program that behaves differently than all other Windows programs. It will be frustrating to users. Windows and DOS have different paradigms and should not behave exactly the same way.

Craig Berntson
MCSD, Visual C# MVP,
 
Despite your running your code in VFP6 now, it sounds like the code itself is really just FP2.6 code.

My first suggestion is to migrate all of the code into the 21st century and into VFP code methodology. Not just the platform under which the code runs, but also the VFP coding methodology. That would include replacing the old @GET/SAY screen 'menus' with VFP menus, FP screens with VFP Forms, etc.

But if you REALLY want to maintain the old code (regardless of what you are running it under) you might want to post your question to the Microsoft: FoxPro (old versions 1 to 2.6) Forum:
Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top