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

Remembering Maximixed Windows in VFP 9

Status
Not open for further replies.

proAmateur

Programmer
Jul 29, 2010
11
US
This is a small problem, but a nagging one I haven't found any reference to. I'm using VFP 9 in Windows 7 (both 32 and 64 bit varieties). VFP will remember the size of a previously opened window (of a program or a form) and provide that when I re-open the window, but if I last used a window Maximized, if I later re-open the window, VFP will give me the last Non-maximized window size. It never opens Maximized --I'll have to do that manually. If I could get my maximized windows back, I'd be so happy!

Thanks for any input from anyone on this.
 
I somehow do not see a problem. Open the coding window, resisize it to whatever size you want, save it... thats it. Unless you delete Foxuser.dbf, that coding window will always open in the same size and position.... simple
 
Well all,
Here's the video I promised. It's an attachment (a link to a url --I hope it works). There is one small change, I hope you don't mind. It is VFP 6 --not 7-- that I was using happily in the old days with pre-maximized windows ... as the attached video attests.
At the start of the video you can see the system being used and then the About VFP info. window. There is audio in the form of clicks and typing, but no voice over. I hope you don't have trouble with codecs and such. I used an ancient version of Camtasia Studio for the screen recording. The video is 600 by 800 and is 1.7MB in size.
If anyone cares to persue the matter of why we had this capability back in version 6 and lost it --as Tamar has tested (thanks Tamar) -- in version 7 and after, it would be useful to know as that might tell us how to get our pre-maximized windows back.
If not, que sera sera.
Dennis
(First VFP, then VFP+activeX, then VFP to html, then VFP to mySql+PHP+javascript)
 
 http://www.workingteacher.com/stuff/vfpMaxed.avi
I can't get to the video; it crashed FireFox for me.

However, I tried my steps in VFP 6 (SP5, I'm pretty sure) and they still don't result in the window reopening maximized. Does that work for anyone else?

If, in fact, there was a change between VFP 6 and VFP 7, it might well be explained by the introduction of IntelliSense. That surely required some changes in the IDE.

Tamra
 
I'm sorry for your trouble Tamar! This isn't something I do every day, but I did try pulling the video down on a couple of computers --with Firefox-- and it worked.

May I suggest this: Point your browser (as the expression goes) to " You should see a page with the heading, "Index of /stuff". The second bulleted item should be "vpfMaxed.avi". If you left click on that, Firefox should give you the choice of either opening it or downloading it. I'd download it, and then try opening it once it's on your computer. To play it, I use VLC player ( It's free, open source, and it played my recording fine on an unrelated computer.

But I'm sorry for your trouble. The fact that you can't get even Version 6 to pre-maximize windows really adds to this mystery. I'm trusting, given your knowledge of VFP far in excess of mine, that you'll tell me how to get maximized windows in VFP 9. Not that you haven't helped me enough already with Hacker's Guide.

Dennis
(First VFP, then VFP+activeX, then VFP to html, then VFP to mySql+PHP+javascript)
 
I'm trusting, given your knowledge of VFP far in excess of mine, that you'll tell me how to get maximized windows in VFP 9.

If I knew, I would tell you. I rarely use maximized windows, so this is something I'd never tried until you asked about it. I like big monitors and to be able to see a lot of things at once.

I'm also a believer that anything you need in a code window should be pretty short. I try to keep my methods and PRGs to sizes where even at half-height on my screen, it's not more than one or two PgDns from top to bottom. So I write lots of short methods that call other methods.

Tamar
 
Tamar,

I see why you wouldn't need it. I got into the (bad) habit of writing short proceedures but putting them all in one big "batch of proceedures" prg., so the pre-Max ability of VFP 6 (my version at least) was really nice. ... Anyway, thanks for looking into it.

Dennis

 
I got into the (bad) habit of writing short proceedures but putting them all in one big "batch of proceedures" prg.

Maybe this change is VFP's way to telling you to break that bad habit. Even if you're using PRGs, storing each function as a separate PRG is generally considered a better practice.

Tamar

P.S. Now that I'm setting off a firestorm <g>, I should say that I'll be on vacation next vacation.
 
Tamar,

I can understand (although I don't practice) associating code with their "natural" objects (buttons, forms, etc) and building up a nice library of super-reusable code --and I imagine that's what you have. But --when you return from vacation, of course-- could you point out an advantage of having multiple functions, each in their own prg? To me, that would be like having each article in an encyclopaedia in its own little pamphlet.

Dennis
 
But --when you return from vacation, of course-- could you point out an advantage of having multiple functions, each in their own prg? To me, that would be like having each article in an encyclopaedia in its own little pamphlet.

Back from vacation. I think the best way to answer your question is to turn it upside. What's the advantage of having all your functions in one enormous PRG that has to be pulled into every project that you write, whether you're using all the functions or not?

To answer more directly, here are some of what I think are benefits:

1) I'm fairly sure that separate PRGs are marginally faster (as long as you don't put a PROC or FUNC line at the top).

2) I find it much easier to manage separate PRGs. If I know the function name, I just type MC <function name> to open for editing. With a procedure file, I have to open the file and then use either Find or Document View to get to the right item.

3) VFP can be very weird about modifications to procedure files. I took over an app last year that has one big proc file. I kept finding that changes I'd make wouldn't show up in testing. Turned out that once I'd built that proc file into an EXE, VFP would always look for it in the EXE instead of the copy on disk. I had to delete the EXE to make my changes show.

Since no one else here jumped in and yelled, I don't think I'm alone in doing things this way. I suspect if you polled the pool of VFP writers and speakers, you'd find that almost all of them use separate PRGs.

One guy, Mike Yearwood, even believes that you should put every class in a separate classlib. I don't agree with him on that, but I do sort of see where he's coming from.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top