Re: Error opening exe by CarolCrow
CarolCrow
Fri Feb 11 22:55:02 CST 2005
*Main.prg_________
PROCEDURE SetForUser
..........................................................
* The password is used to determine how the environment is set.
* If it is 'MILBOURN', then the development environment is
* set; otherwise the user enviroment is set.
*...............................................................
IF _cPass == 'MILBOURN' AND _bDevelop
*
DO (_cSystem+".MPR")
DO Add2File.MPR && Adds bars to the 'FILE' pad.
DO Develop.MPR && Adds the pads of 'EDIT' and 'PROGRAM'
ACTIVATE WINDOW COMMAND
ELSE
SET SYSMENU TO
DO (_cSystem+".MPR")
* ZOOM WINDOW COMMAND MIN
DEFINE WINDOW Hide FROM 1,1 TO 3,3
ACTIVATE WINDOW COMMAND IN Hide
ENDIF
++++++++++
Flipmode.prg
IF _bDevelop && DEVELOPER MODE ;
==============
* Cancel the Event Loop.
*
CLEAR EVENTS
*
SET DEBUG ON
* Restore the command window.
ACTIVATE WINDOW Hide
ACTIVATE WINDOW COMMAND IN SCREEN
RELEASE WINDOW Hide
*
DO SetForUser IN Main
*////
IF _bChucksPC
SET HELP TO C:\VFP3\FoxHelp.HLP
ENDIF
*\\\\ -->CM (04/26/00)
*
SET ESCAPE ON
ON ERROR
ELSE && USER MODE ;
=========
*
* Hide the command window.
DEFINE WINDOW Hide FROM 1,1 TO 3,3
ACTIVATE WINDOW Command IN Hide
ACTIVATE WINDOW COMMAND BOTTOM
SET ESCAPE OFF
SET DEBUG OFF
ON ERROR DO StatLook WITH 'SEVERE',;
'Unknown error -- general error routine invoked.',&_Args
DO (_cSystem-".MPR")
READ EVENTS
ENDIF
RETURN .T.
"Mark McCasland" wrote:
> Can you post the code?(See Main.prg and Flipmode) Include a few lines before these "Command" lines and
> a few lines of code after them. Try to include any lines of code around
> these "command" lines that you think are important. I can not imagine anyone
> needing such lines in an app.
>
> "Carol Crow" <CarolCrow@discussions.microsoft.com> wrote in message
> news:D5851695-02E5-4010-ADA9-D6E00E98393D@microsoft.com...
> > I see where the command window is called but if I*** it out then the
> program
> > misbehavies. --And I do see a HIDE WINDOW COMMAND.
> > How do I work around this?
> >
> >
> > "Dan Freeman" wrote:
> >
> > > I agree with Rick. Code references is your best tool for this.
> > >
> > > Putting on the way-back hat, many inexperienced FP2.x developers
> mistakenly
> > > issued HIDE WINDOW COMMAND thinking they needed to get rid of the
> command
> > > window in a runtime app. (There is no command window in a runtime app.
> <g>)
> > > There was even a (erroneous) knowledgebase article advising people to do
> so
> > > for a while.
> > >
> > > You might look for that.
> > >
> > > Dan
> > >
> > > Carol Crow wrote:
> > > > Thanks for the tip - I have converted the screens and everything is
> > > > working as expected - I had a few bumps but it works.
> > > > Regarding the 'command' not defined - where would I define the
> > > > Window. Could the problem stem from when I build the exe? I'm a
> > > > novice with this - I need real specific help.
> > > >
> > > > "Mark McCasland" wrote:
> > > >
> > > >> I am afraid you are in for much more than you bargained for. I do
> > > >> not know of anyone who just converted a 2.x app to a VFP app.
> > > >> Everyone I know of has just re-written the app in VFP from scratch.
> > > >> You really should trying running your converted forms from the VFP
> > > >> command window first to make sure they work as expected.
> > > >>
> > > >> As for your error, it looks like you are trying to show or activate
> > > >> a window named Command which would be the VFP command window. If
> > > >> this is your own command window, you should name it something else
> > > >> like cmdWindow.
> > > >>
> > > >> "Carol Crow" <CarolCrow@discussions.microsoft.com> wrote in message
> > > >> news:AC6B4F32-09A3-43D1-AFA0-5998196A6FA7@microsoft.com...
> > > >>> I'm upgrading vfp 2.x to vfp 9. I fixed all compiling errors - and
> > > >>> built a new.exe. When I run new.exe I get an the error Window
> > > >>> 'command' has not been defined.
> > > >>> I can click ignore, the main menu runs but it then claims my files
> > > >>> are corrupt (which they are not because I checked them).
> > >
> > >
> > >
>
>
>