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

How to detect the existence of a menu or prg

Status
Not open for further replies.

pdonahoe

Programmer
Apr 18, 2002
16
0
0
US
I know how to check for the existence of variables and objects (using VARTYPE), but how do you check for the existence of menus and prg's?
 
Can you use the FILE() function ?

If file('MyProgram.prg') && use MPR extension for menu
*** exist
else
*** not exist
endif

-- AirCon --
 
AirCon:

Bingo! That is exactly what I needed. I don't know why I couldn't think of that -- I guess I wasn't thinking of prg's and menus as being 'files'. I was thinking in the 'VARTYPE' mode! I am wanting to be sure in particular that some of my menus are present before they are called, so this will take care of the problem.

Thanks for your response
 
pdonahue

It happened sometimes (often). It happen to me either :-D

Regards

-- AirCon --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top