Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I've learned more from your forums in 3 days than 3 months at school and on the job combined..."

Geography

Where in the world do Tek-Tips members come from?

Can't get rid of confounded Command Window in Foxpro 2.6 for WindowsHelpful Member!(2) 

Helpful Member!  Gonzy (Programmer)
9 Jul 00 22:48
Please help.  I've wasted alot of time trying to figure out how to get rid of the command window upon start-up.  Made a copy of sysmenu to create my own application menu...have alot of the system written, but everytime I start Foxpro 2.6 for Windows, there's that frickin' command window.  I've tried the Hide Window Command, removing the pad option from the window pop-up, etc.  The book says I can do it directly, but it does not give an example.

I know I can click on Window and click on Hide, but I don't want it to come up when my application comes up.  What am I doing wrong?

Thank you for any and all help.

Gonzy
dgrewe (MIS)
10 Jul 00 7:38
Sounds like you do not have a read event in you application and the program completed it task.
Here is Two samples in one program of how to create a never ending read event so the command window does not appear.  The primary key is the read valid statement. the just in case key is the do while loop.

*
* MAIN PROGRAM LOOP
*
glRunExe = .t.
do App.mpr
do while glRunExe=.t.

  on shutdown do EndExe
  read valid glRunExe

enddo

procedure ENDEXE
*******************************************************************************************
* globial procedure for when the user saids they have had enought of this application
********************************************************************************************
clear read all
close data
clear events
on shutdown
*
glRunExe = .f.
if Backdoor trap = .t.
  quit
endif
return .f.


David W. Grewe
Dave@internationalbid.net

CDavis (Programmer)
10 Jul 00 12:08
Another way to get rid of the command window is to issue Ctrl-F4 and you could do that with a keyboard command.  Issue Ctrl-F2 to activate it again.  If you are operating in the development environment -- it is nice to be able to get to the command window.

CDavis
Helpful Member!  MikeWood (MIS)
11 Jul 00 16:54
OK.  Here's how I do it.  You will need some code in the setup and cleanup snippets of your menu.

SETUP snippet

  DEFINE WINDOW hidecomm FROM 1,1 TO 3,3
  ACTIVATE WINDOW command IN hidecomm

CLEANUP snippet

  DEACTIVATE WINDOW hidecomm
  RELEASE WINDOW hidecomm

Occasionally, the command window does not come back.  Just press CTRL-F2 to get the command window back.

Now, I usually make this code conditional.  For instance, I have some power users (including myself) who can create queries and reports, so I let those users keep the command window.

For example:

SETUP

IF NOT cNetID$cPowerUsers
    DEFINE WINDOW hidecomm FROM 1,1 TO 3,3
    ACTIVATE WINDOW command IN hidecomm
ENDIF

CLEANUP

IF NOT cNetID$cPowerUsers
    CLOSE DATABASES
    QUIT
ELSE
    SET HELP TO SYS(2004)+"FOXHELP.HLP"
    POP MENU _msysmenu
    DEACTIVATE WINDOW hidecomm
    RELEASE WINDOW hidecomm
    SET HELP OFF
    SET HELP ON
ENDIF

Hope this helps.  Good Luck.

Mike Wood
mwood@awod.com

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close