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!

Pinning down the Data Session, Command, Call Stack, Locals, and Debug Output windows 3

Status
Not open for further replies.

dkean4

Programmer
Feb 15, 2015
282
0
0
US
I have a 55" monitor on a 4K monitor and it is great for VFP. Absolutely love it. But there is an irritating problem on the bottom line, where I keep the staple following little utility windows.
From left to right on the BOTTOM GROUP, I like to have them sit as follows:
Bottom-Left I position the Data Session window as the leftmost window in that bottom group.
Next is the Command window.
Then the Call Stack Window
Then the Locals Window
Lastly, the Debug Window

It all looks great until I close VFP and restart it. When I do that the only window which remains expanded is the Command window. All the other ones collapse and require me to expand them manually. Is there a command like:
Code:
_VFP.command.width = 1000
The example does not work, but is there a way to access these Utility subWindows and override their dimensions?
Having to rearrange those windows is the most irritating problem I can think of.
20220824_142733_1_df7tzm.jpg
20220824_142845_1_cyxzxb.jpg


The first image is how I would like to have it come up.

The second image is how it comes up. Clearly all but the Command window are shrunk to a near-nil.

This is a major frustration for me.






Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
Dennis,

I've just tried to reproduce your setup, but I'm not seeing the same behaviour that you are. All the windows you mention retain their position when I restart VFP.

Just to check: (i) Have you made the windows dockable? and (ii) if so, have you actually docked them?

For what it's worth, I have a similar requirement, but instead of docking the windows to one edge of the screen, I dock one inside the other, with tabs to switch between them. There are pros and cons to that arrangement.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
If you mean docking to be along the border, YES! On the right side, I dock the Watch window into the Trace window.
On the bottom, I docked the Data Session window first, then docked the Command window into it, then the Locals Window on the right side of the Command window, then the Debug Output, and finally the Call Stack window and they play obediently. Exit and then come back in only the Command Window remains expanded. The others shrink down but are still there.




Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
Mike, they all are grouped together. If I raise the ceiling on the Command Window, all 5 raise their ceiling in unison!


Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
Mike

You said: "I dock one inside the other, with tabs to switch between them."
That is not useful on the bottom. My screen has a lot of real estate, so I do not have a need to convolve them into a single frame. It speeds things up because you can see everything at once. A click of the mouse takes a lot longer than a glance.

If I could figure out the location where to settings are held, I would dare do some poking to adjust them on the way up as VFP starts.


Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
When I start the VFP IDE, it calls a setup.prg where I call Windows API functions like FindWindow, MoveWindow and UpdateWindow to size and place system windows such as "Command" and "Project Manager" the way I prefer (undocked).

I have never tried with the Debugger windows, but you might find a similar solution.
 
Dennis,

I understand what you are saying. I'll experiment some more, but for now I'm afraid I can't see any explanation.

One thing to keep in mind is that the relevant window settings are stored in the Foxuser files. Is it possible that you have disabled these files in some way, perhaps in Tools / Options / File Locations or with RESOURCE = OFF ?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Unlike Dario (vfp4ever), I don't have code in my startup program to open the system windows. But I do have code in my applications to hide and show the windows when running in the development environment.

Hiding a window is simply [tt]DEACTIVATE WINDOW "Locals"[/tt] or whatever. To restore it, I do this during program close-down:

Code:
IF WEXIST("Locals")
  ACTIVATE WINDOW "Locals"
ENDIF

repeated for each of the relevant windows.

I don't know if that helps at all.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike

Every bit helps. It probably does have to do with SET RESOURCE TO and I found some info on the MS forum that suggests it. Is there anything like "? RESOURCE" that interrogates if it is turned on or which FoxUser.dbf file it is wired into? I've tried everything I could think of...




Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
To read out a setting, you use the SET() function as counterpart to all the SET commands.
SET('RESOURCE'), SET('DELETED'), SET('SAFETY'), etc.

Besides that, as Mike already said you find it in the options dialog in the file locations:
file_locations_eznznp.png


Usually, if a file location is given for foxuser.dbf (listed as "Resource File") it's also active, but a double click on the file name reveals it unmistakable.

Chriss
 
Thank you Chriss... Appreciate your tip about the Resource file location on the Options window. I completely forgot about that.



Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
Dennis, it may not apply to your problem, but to avoid some issues regarding window settings after starting VFP, once I have everything arranged and it is saved to the resource file, I saved the resource file to another location and everytime I start VFP, I do it through a batch script, which first overrites the default ressource source file with the one I saved separately and then runs the vfp.exe. I found this to be the safest way to have the exact same settings at every startup and not to loose these settings when I accidently change something.

Something else you could try: When you have your windows arranged in VFP, before closing VFP make the VFP window normal (not maximized) and then close VFP. I noticed when you close VFP while it is maximized or not maximized has effects on how VFP saves the window / dockable sidebar positions regardless of the resource file (strangely, there has to be another place where these settings are stored).

 
Mannib

Now, that is an interesting idea. And that is why I tried to separate the FOXUSER.DBF Resource files. I often do different things with different projects. And that is exactly why I separated them. Now that I have found which one is busted, I will delete it and go back to my old way of doing things. That makes sense to me.

And concerning the settings of the dockable windows, I do not get the windows to go back to the original place, but they do move into different positions which are easier to adjust. So your idea is good and I took your advice not to close it when VFP Screen is in the Maximized mode.

Thank you for passing that on to me, Mannib! I see that you had the same concerns.



Dennis Kean

Simplicity is the extreme degree of sophistication.
Leonardo da Vinci
 
Dennis, I'm glad that you found a way!

Concerning the closing of VFP in maximized or normal window state, my experience is that you only have to close VFP in normal state once. Afterwards the settings are saved and you can close VFP in maximzed state from then on. When things get messed up, you can go to normal state, rearrange, close VFP while in normal state and then settings are saved again.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top