Thursday, March 26, 2009

How to get your VFP IDE windows to behave.

This fall I watched Alan Stevens present at the Southwest Fox conference and I really liked the way he had his Visual FoxPro IDE windows docked so when I got back home I tried it. The layout looks like this:

The problem that I had is the Visual FoxPro would not remember the position of the windows when exiting. Sometimes on startup it would be close but never totally correct. I asked Alan about it but he had never seen this behavior. 

Finally after several months I found the solution on Tek-Tips. The original solution can be found here (http://www.tek-tips.com/viewthread.cfm?qid=1515817&page=4). But the basic steps behind this thread are:

1. DELETE your Resource file 
2. Start VFP and SET RESOURCE ON 
3. Confirm using ?SET("Resource")
4. Very important step: click the button to the left of the Close (X) button so that the VFP IDE is not maximized
5. Open, position, size and dock your windows/toolbars the way you want them.
6. Quit VFP by clicking the Close button (X), not by choosing File - Exit.
7. Restart VFP and the IDE should be the way you want it.

You can now Maximize the IDE and when you restart everything will still be where you want it.

2 Comments:

At 10/01/2009 11:49 AM, Blogger Eduard said...

Mor interestingly, you can toggle the ReadOnly field in your foxuser.dbf resource file for those windows (i even did these for my toolbars) and if you mess things by accident all you have to do is restart vfp :D I used this for years can't imagine living without it (tip: dbl-click the foxuser.dbf file, don't open it from vfp)

- edyshor -

 
At 3/19/2010 7:36 AM, Blogger Eduard said...

no comments' guess people didn't like my solution :)

anyway, i have encountered something else, something truly ugly... my "foxuser.fpt" file gets trashed .. as in shift+deleted (it's not in recycle bin). Can't figure out the problem :(

It started happening 3-4 days ago, for no apparent reason. It only happens when i close my vfp ide, after I've exe-build a project (that has nothing to do with the resource file), the only thing foreign is white-lightning' projecthook (the one were you can add multiple hooks to it). No special hooks there, i've even configured to load none of my custom created hooks but the standard provided in the vcx and it's still happening.

Does someone have any idea ?

One time when i've marked my resource files as read-only it trashed my pjx file (luckily i had a backup)

No other problems with projects that don'e have that projecthook.
The strange thing is i had no problems with it before (and i'm using it for a couple of months now), i kinda got dependent on it.

Any idea ?!

 

Post a Comment

Links to this post:

Create a Link

<< Home