Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Barry Lupton
  Where is Barry Lupton?
 Coventry
 United Kingdom
 Barry Lupton
 To: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 Tags
Subject: RE: Finding my files
Thread ID: 111563 Message ID: 112802 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Menus
Date: Monday, November 13, 2006 10:02:10 AM         
   


> > > > > > > > Hi Folks: I never was a programmer but as a manager I had a close brush with FoxPro in version 2.6 and had been impressed by its capabilities. So when I retired / took my final career break, I bought a copy of VFP 9.0 hoping to revive my interest and do something useful with it, such as write some software for my son-in-law’s business.
> > > > > > > > I’ve played around with tables and drafted some forms and have been pretty pleased with the result, but when it came to organising access to them via a menu I can’t get the system to find my menu. Clearly it’s something to do with paths. I would be very grateful if anyone can explain how I should do this (I have set a path in the main program without it producing the desired effect).

> > > > > > >
> > > > > > > Barry,
> > > > > > >
> > > > > > > I haven't seen you here before, so welcome to the community. The easiest way to handle a main menu is to handle it in your Main.Prg.
DO [Menus\MyMainMenu.MPR]
This assumes that you store your menu in a "Menus" sub-directory located under your application directory. You can use the relative path in just about all of your commands. For example:
DO FORM [Forms\MyForm]
> > > > > > > DO [Progs\MyProgram]
> > > > > > > REPORT FORM [Reports\MyReport]
> > > > > > > ...
> > > > > > > 

> > > > > > > Give it a try and see what you get.
> > > > > > >
> > > > > > > Ken
> > > > > > > You shall know the truth - and the truth shall set you free. (John 8:33)

> > > > > >
> > > > > > Hi Ken
> > > > > >
> > > > > > I thought I'd replied to your message but can't see it on the topics list. Anyway, thanks again for your suggestion which I was keen to try as it seemed so simple and so obvious - can't think why I hadn't tried it earlier (though I had tried entering the full path). Unfortunately for me it didn't do the trick. As you will see I also tried Andy Kramek's suggestion also with no success. Any other ideas of where I'm going wrong? Incidentally, how do you manage to get a photo with so few pixels?
> > > > > >
> > > > > > Barry

> > > > >
> > > > > Barry,
> > > > >
> > > > > If you are using the relative paths and it isn't working, then there is probably something wrong with your PATH. First, I assume that you have used a typical directory structure:
> > > > >
> > > > > AppDir
> > > > >    ---Data
> > > > >    ---Forms
> > > > >    ---Libs
> > > > >    ---Include
> > > > >    ---Reports
> > > > >    ---Menus
> > > > >    ...
> > > > > 

> > > > > The first question is "do you use this kind of structure?" Assuming that you indeed do use this kind of directory structure, what does ?SET([PATH]) return? It should return the full path to your appdir. (It can contain other directories, but the first one should be your appdir.)
> > > > >
> > > > > Ken
> > > > >
> > > > > You shall know the truth - and the truth shall set you free. (John 8:33)

> > > >
> > > > Hi Ken
> > > >
> > > > Thanks for the wonderful help my query sparked off, and for your welcome to Foxite. I've managed to move off the starting blocks and am trying a few things now. It's all looking more promising, but no doubt I'll have more queries before I'm through. Regards. Barry

> > >
> > > Barry,
> > >
> > > Glad I could be of some help. If you need to ask more questions, please do not hesitate.
> > >
> > > A wise man once told me "The only stupid question is the question that is left un-asked."
> > >
> > > Ken
> > > You shall know the truth - and the truth shall set you free. (John 8:33)

> >
> > Ken
> > Thanks for your encouragement to ask questions. I note your wise friend’s saying, but when you are starting as far back as I am, it can be embarrassing. I mean, why should I trouble you? Why didn’t I, instead, shell out on a basic training course or buy some books or something?
> > Looking back, perhaps I should have invested in the course, but it seemed a lot of money at the time. Then, I looked around at the books, reading excerpts here and there. I bought one (which was very disappointing) and thought I’d just jump in. Not much success so far. I was happy enough with the tables and forms and thought I was well underway, but when it came to adding menus and running them as an application I have come unstuck.
> > So, here’s a question. I open a new application and am presented with a program called . If I write my own main program, how does it relate to this generated program? Can I simply ignore it?
> > Then with the menus: I’m given two and (why two?). Should I start by modifying these or can I go straight to my own menu?
> > Barry
>
> Barry,
>
> It sounds as if you are using the application wizard. Don't even bother with the application wizard. Create your own apps from scratch. You are going to be able to create far better applications quicker doing it yourself.
>
> My recommendation would be to start with your own Main.Prg. You can create a generic Main.Prg that you can use in all of your apps. The next app you create, you simply copy in that Main.prg and modify the SET PATH command, etc. What should go into a Main.Prg? There are a number of threads dealing with this in the archives here.
>
> The Menu situation is similar. Create your own - don't use the app wizard. Again, you can create a stock menu that already contains a good deal of what you need (File->Open, Close, Edit, Save, Edit->Cut, Copy, Paste, etc.) You can copy that menu in and modify it for each app.
>
> As to "your troubling us with questions?" When I first started programming, a number of very good people answered my questions. I would be repaying them poorly if I were to hesitate in answereing yours. The forum is a give and take thing. I answer your questions, but others answer mine. Eventually, you will get to the point where you feel confident enough to answer questions yourself.
>
> As to books, Andy and Marcia wrote a number of books on VFP. Go to their website and you can follow the links. WWW.TightlineComputers.Com Andy and Marcia both write very well indeed and I would have no trouble in recommending their books. Mike Lewis has a page on his site where he evaluates a number of books here: http://www.ml-consult.co.uk/books.htm
>
> Hope this helps,
>
> Ken
> You shall know the truth - and the truth shall set you free. (John 8:33)

Hi Ken

Thanks for the tip about wizards. I'm on my way again now. And I've decided to splash out on Andy's book.

Watch out for my next query!

Barry

ENTIRE THREAD

Finding my files Posted by Barry Lupton @ 10/30/2006 11:48:57 AM
RE: Finding my files Posted by Ken Murphy @ 10/30/2006 12:47:28 PM
RE: Finding my files Posted by Barry Lupton @ 10/31/2006 1:35:03 PM
RE: Finding my files Posted by Eric den Doop @ 10/31/2006 1:43:54 PM
RE: Finding my files Posted by Ken Murphy @ 10/31/2006 1:52:29 PM
RE: Finding my files Posted by Barry Lupton @ 11/6/2006 1:51:39 PM
RE: Finding my files Posted by Ken Murphy @ 11/6/2006 2:09:18 PM
RE: Finding my files Posted by Barry Lupton @ 11/7/2006 1:16:04 PM
RE: Finding my files Posted by Ken Murphy @ 11/7/2006 2:31:26 PM
RE: Finding my files Posted by Barry Lupton @ 11/13/2006 10:02:10 AM
RE: Finding my files Posted by Andy Kramek @ 10/30/2006 1:06:45 PM
RE: Finding my files Posted by Barry Lupton @ 10/31/2006 1:24:04 PM
RE: Finding my files Posted by Ken Murphy @ 10/31/2006 1:44:38 PM
RE: Finding my files Posted by Andy Davies @ 10/31/2006 3:54:57 PM
RE: Finding my files Posted by Ilya Rabyy @ 10/31/2006 4:58:05 PM
RE: Finding my files Posted by Andy Kramek @ 11/1/2006 12:52:10 PM