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!

A way to dismiss Command Window other than clicking the X?

Status
Not open for further replies.

dmusicant

Programmer
Mar 29, 2005
253
US
I don't know of a way, either entering something in the Command Window or programatically, of hiding the Command Window in the VFP 9.0 IDE other than clicking the close X at the upper right of the Command Window. Control +F2 makes it appear, but doesn't subsequently hide it.Is there a way other than clicking that X?
 
You can modify the sysmenu:

Code:
Define Bar 10 of _mwindow Prompt 'Hide Commandwindow' KEY CTRL+F3,'Ctrl+F3'
On Bar 10 Of _mwindow Hide Window 'command'

Besides that, the command window automatically disappears once you start a prg and have a modal window or READ EVENTS, there hardly is the need to hide the command window programmatically.

Bye, Olaf.
 
Why are you trying to hide the Command Window? It disappears on its own when you're running code.

Tamar
 
I agree with Tamar, why is the Command Window open when you are running your application as an EXE?

Good Luck,
JRB-Bldr

 
The command window is not present when an application is running. Period.

The command window is Visual Foxboro's "wait state". It's what keeps you "in" VFP.

If you're running an application, something else needs to be going on or your application has ended and you're back in VFP. (As Olaf mentions, that would be READ EVENTS.)

When you ask how to hide the command window you're asking the wrong question. You should be asking "why isn't my application running?
 
Well, this app branches out into lots of areas, it was written in FPW 2.6, but as I've discussed, it bombs once in a while with a message indicating not enough screen space. Has to do with font, screen size, I forget the exact message right now. I suppose it has to do with my monitor size, the resolution, maybe the font and font size. I think it's the screen .SPR that's bombing.

So, my workaround was to create a VFP 9.0 form for the front end of all this instead of the FPW screen. I do have a project for the FPW app, but don't bother to generate an EXE. I have done so in the past, but in general I don't open the project, I just run a PRG that launches the opening screen. However, as I said, occasionally that screen fails to reappear without an error. The screen is regenerated by virtue of a looping mechanism.

If I run the VFP form instead, I can do it from the Command Window (e.g. Do form <myform>) or I can run that line in a PRG. Either way, the Command Window is there along with the form. It's not a problem being there but it looks weird, is a distraction, I have no need of it while the form is running. From the form I can run any of several programs from buttons on the form.

I tried several things to hide the Command Window, all without success.

I hope that explains why I want to hide the Command Window. Yes, I can generate an EXE instead, and maybe I should. However, it seems like an unnecessary step when I'm running all this stuff right in the VFP IDE.

Edit: So, as an experiment I just ran the form and instead of clicking a button on the form I entered the code in the Command Window that would do the same thing. Things went as expected and when I exited from that routine I was left with the form however the Command Window had disappeared. I'm mystified, to be frank.
 
> The screen is regenerated by virtue of a looping mechanism.

You don't do a loop in VFP, you add a READ EVENTS for catching any and all events.
Then the command window also doesn't appear.

Bye, Olaf.
 
Tamar said:
Why are you trying to hide the Command Window? It disappears on its own when you're running code

Dan said:
I agree with Tamar, why is the Command Window open when you are running your application as an EXE?

Actually, the command window might be open when you are runnng your code. It will be open if it is docked to other system windows.

If that is the case, the way to hide it is to issue [tt]DEACTIVATE WINDOW "Command"[/tt].

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
And the other way around: If the command window does not disappear it's more likely it has both disappeared and reappeared rightaway. And it has reapeared after finishing the loop of your application. But since you don't compile an EXE and have no cleanup parts of your forms, get, say and prompts still are on screen. The command window only reappers after code has finished or while it's suspended. You have some unwanted exit condition in your loop, if you get back to the command window though you didn't want to exit.

Bye, Olaf.
 
One way to make the Command Window disappear when running a VFP form is to make the form modal. Then, you're in a wait state until you dismiss the form.

Tamar
 
And then you're dealing with all the inconvenience of dealing with a modal form. [thumbsdown]
 
Hi Tamar. I saw you some years ago at a BAADD meeting (Bay Area Association of Database Developers).

I am leaving town this morning, won't have a chance to try out some things based on the information in the recent posts. I'll return in a few days. Yes, I may have to alter some of the code here.

Meantime I actually can run my app from a thumb drive I'm taking with me. It has FPW on it, which is a lot easier to install than VFP (which I've never attempted to install on a thumb drive, don't know if it's possible). FPW I simply did a copy/paste!
 
Yup. Some of us have been running "VFP on a stick" for years. I have one USB thumb drive that has VFP 6,7,8 and 9 on it. I carry it on client visits all the time.
 
Can't have been at BAADD; I never spoke there. I spoke at the various SoCal groups a time or two. Vancouver, once.

Tamar
 
Yep, I know that BAADD isn't part of SoCal, but that and Vancouver were the closest places to SF that I spoke at a FUG.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top