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

Visual FoxPro 6 forms 2

Status
Not open for further replies.

Phil Thoms

Programmer
Oct 31, 2005
245
GB
I have 3 forms that work together, what is the best way to hide the command window and re-show it when quitting from last form. Thanks
 
1. Write a small program called (say) Main.PRG. The program should call the first form, and then issue READ EVENTS.

2. In the last form (the one you will close to end the application), have it issue CLEAR EVENTS in its Destroy.

3. To launch your application, run Main.PRG instead of the first form.

Mike





__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
I should have added that the steps I described are the normal way to create any non-trivial VFP application, and is worth doing even if you didn't want to hide the command windows.

There's a good explanation of READ EVENTS in faq184-4232

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
"what is the best way to hide the command window and re-show it when quitting from last form."

The Command Window usually does not show AT ALL in a compiled VFP application.

Help clarify things for me, do you mean that you ARE running your application and its Forms in the Development mode where the Command Window exists?

Or are you wanting to compile your 3 Forms into a VFP application (an EXE) so that you launch the application from a desktop shortcut and there is NEVER a Command Window?

Or something else?

You might benefit from looking over the VFP tutorial videos at:
Good Luck,
JRB-Bldr
 
The Command Window usually does not show AT ALL in a compiled VFP application.

That's true.

But, just to clarify, the Command Window also doesn't show when you run a PRG file in the development environment. It does remain on the screen in the dev. environment if you just run a form (rather than a PRG), which is what Philthoms is doing.

As an exception, when you run a PRG in the dev. environment, the Command Window remains visible if it is docked.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Mike - I agree, but I am still confused as to what philthoms is trying to do when they say that they WANT the Command Window to re-appear after running the Forms.

Why would they want that?
That certainly is not a typical need for a VFP application.

I know that both of us (and many others) have found that there are times when we have to DIG through what is asked (and how it is asked) in order to find out what is REALLY the issue and what is REALLY needed.

Perhaps we will hear back from them to clarify the reasons behind their request. Then, with that clarification, we can determine if you have already solved their issue or if we still need to provide them with advice/suggestions that address what they REALLY need.

philthoms - Good Luck,
JRB-Bldr
 
I am still confused as to what philthoms is trying to do when they say that they WANT the Command Window to re-appear after running the Forms. ... Why would they want that?

Yes, I know what you mean, JRB-Bldr. As I'm sure you'll agree, it's better to answer a question when we can help the questioner towards their end goal, rather than just giving a literal answer.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top