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

Foxpro 2.6 Dos dropdown menu 2 level 1

Status
Not open for further replies.
Aug 19, 2019
2
ID
Hi, i search over internet about tutorial to create dropdown menu in dos app with foxpro 2.x but no luck, how can i achieve this ? , could anybody who expert in foxpro teach me ?, because im learn foxpro from scrath , very very newbie about this..
 
Given that you are learning Foxpro from scratch, why on earth are you learning Foxpro for DOS? That product was discontinued about 25 years ago. It is very unlikely you will find any tutorials or other on-line information to help you.

That said, the menu commands that are available in the current versions of Visual FoxPro more or less work in FoxPro for DOS. The relevant commands are DEFINE MENU, DEFINE PAD, DEFINE BAR, ON PAD, ON SELECTION and ACTIVATE MENU. You can look these up in the VFP Help file, which is available on line. But note that not all the options for those commands will work in the DOS version.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Here is some example code which I have copied from the VFP Help file. To keep it simple, I've removed a few options including some that might not be supported in FPD.

Code:
*** Name this program DEFINBAR.PRG ***
   CLEAR
   SET SYSMENU SAVE
   SET SYSMENU TO
   DEFINE PAD convpad OF _MSYSMENU PROMPT '\<Conversions' 
   DEFINE PAD cardpad OF _MSYSMENU PROMPT 'Card \<Info' 
   ON PAD convpad OF _MSYSMENU ACTIVATE POPUP conversion
   ON PAD cardpad OF _MSYSMENU ACTIVATE POPUP cardinfo
   DEFINE POPUP conversion MARGIN RELATIVE COLOR SCHEME 4
   DEFINE BAR 1 OF conversion PROMPT 'Ar\<ea' 
   DEFINE BAR 2 OF conversion PROMPT '\<Length' 
   DEFINE BAR 3 OF conversion PROMPT 'Ma\<ss' 
   DEFINE BAR 4 OF conversion PROMPT 'Spee\<d'
   DEFINE BAR 5 OF conversion PROMPT '\<Temperature' 
   DEFINE BAR 6 OF conversion PROMPT 'T\<ime' 
   DEFINE BAR 7 OF conversion PROMPT 'Volu\<me' 
   ON SELECTION POPUP conversion;
      DO choice IN definbar WITH PROMPT( ), POPUP( )
   DEFINE POPUP cardinfo MARGIN RELATIVE COLOR SCHEME 4
   DEFINE BAR 1 OF cardinfo PROMPT '\<View Charges' ;
      KEY ALT+V, ''
   DEFINE BAR 2 OF cardinfo PROMPT 'View \<Payments' ;
      KEY ALT+P, ''
   DEFINE BAR 3 OF cardinfo PROMPT 'Vie\<w Users' KEY ALT+W, ''
   DEFINE BAR 4 OF cardinfo PROMPT '\-'
   DEFINE BAR 5 OF cardinfo PROMPT '\<Charges '
   DEFINE BAR 6 OF cardinfo PROMPT '\-'
   DEFINE BAR 7 OF cardinfo PROMPT 'E\<xit '
   ON SELECTION POPUP cardinfo;
      DO choice IN definbar WITH PROMPT( ), POPUP( )
   PROCEDURE choice
   PARAMETERS mprompt, mpopup
   WAIT WINDOW 'You chose ' + mprompt + ;
      ' from popup ' + mpopup NOWAIT
   IF mprompt = 'Exit'
      SET SYSMENU TO DEFAULT
   ENDIF

If you want to try it, save the above code in a file named DEFINBAR.PRG, then run that PRG. To exit, choose Exit from the CardInfo menu.

But I still think you should abandon FPD and go straight to VFP.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Dear Mike

thank you for helping to give me a sample code snippet for FPD

I am an ordinary employee at a company.
my hobby is making applications that can simplify the work process at the office.

but I am not a real programmer, I do it occasionally.
and not for money.

Maybe it's because of my hobby that makes me happy experimenting with programming languages ​​to be useful in the work environment.


why I ask the ancient language, I mean the dos version of Foxpro.

the owner of the company was inspired by old scholl movie which at that time the computer application used was still based on text programming. he said "it looks light and simple"

honestly it's a strange reason, but it also makes me curious to try.

so let's do it ...

at the same time, we need applications to record book transactions (such as libraries).

next..

I was asked to make it. and i said yes.

that's the story, why am I stranded on this forum asking about products that were discontinued 25 years ago ...

You have said VFP Help file is available on line, where can I read that, is there a recommended address for that?


Hi mike, im glad its working..

mikepost_t98t71.jpg



thank you, have a nice day

ariowishnu
 
Glad to see you got it working. Your boss is right when he described Foxpro for DOS as "light and simple". And you might well find it suitable for developing your hobby - and fun. But I wouldn't recommend it for developing serious business applications.

The full VFP 9.0 Help file is available here:

But keep in mind that most of the commands and functions are simply not available in FPD. But given that you own the FoxPro for DOS software, you should also have its own Help file.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hello Ariowishnu,
I have an old Foxpro DOS book published in 1990 written by John Zumsteg which covers all the commands and functions pertaining at the time.
If you are interested in borrowing this let me know.

Phil
 
Hello Ariowishnu,

I see you have received lots of good answers to your questions, but forgive me there is an other one:
forget about Fox for Dos. Buy a version of VFP9, buy the book "Everything you want to know about Visual FoxPro" To be bought from Hentzenwerke publishers.
When you have done and installed VFP9, please report here again and we will assist you to upgrade VFP9 to the latest version VFP9SP2. Than you are ready to open the book, and open the homepage of Mike Lewis to learn all the tips and tricks.
This all can be done within a week and you are much, much better of to start with VFP than when you waste your time with the DOS version.
I promise you within a week you can built a simple application to administrate books for libraries, if I am not wrong there is even a sample application delivered with VFP doing that.

Good luck,

Koen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top