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

How to solve this issue

Status
Not open for further replies.

Irwin1985

Programmer
Feb 2, 2017
44
ES
I have a menu embdbed to _SCREEN:

[pre]
On Selection Bar 1 Of MyPopMenu Do prcLoadConfig
[/pre]

[pre]
Procedure prcLoadConfig
MessageBox("Hello Procedure!!!")
EndProc
[/pre]

Works quite good but if you switch VFP main window to another and execute the option again then you get this error:

Error_yyt89r.png


What am I doing wrong?

A team is only pieces that you exchange until you finish the work, it is efficient, it works.
 
This is because, at the time of making the menu selection, VFP cannot find the PRG file (prcloadconfig.prg).

If you are running in the development environment, make sure that the file is in your search path (as determined by SET PATH). If you ar running from an EXE, make sure the file is in the project at the time you do the build (and is not excluded).

Another option is to precede the filename with the full pathname, but that is not ideal as it will cause problems if you move the file to a different location.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Thanks Mike,

I did solve the problem by creating a custom class and put all menu procedures in it.

A team is only pieces that you exchange until you finish the work, it is efficient, it works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top