Why does the VFP EXE run in the background after my program shuts down? 
Author Message
 Why does the VFP EXE run in the background after my program shuts down?

Maybe, just maybe, you have active transactions
*---------------------------------------------------------------------------
procedure ShutDown()
 _screen.WindowState = 2
 if( TRUE)
  if( (GetFormCount(TRUE) > 0) )
   MessageBox('Cannot close', MB_OK + MB_ICONEXCLAMATION ,_Box_Title())
   return
  endif
 endif
 if( !CloseDataBase() )
  MessageBox('Cannot close', MB_OK + MB_ICONEXCLAMATION ,_Box_Title())
  return
 endif

 clear events
 do while ( txnlevel() > 0 )
  rollback
 enddo

 release all

 quit
endproc
*---------------------------------------------------------------------------

  Hi,

  I had posted this question a few months ago but I am still having the same
  problem and I hope someone can help.    I have a VFP EXE that occasionally
  will keep running in the background (appears in the Windows Task Window)
  even after exit.  This is my shutdown routine:

   on error
   close all
   clear events
   release all
   quit

  I would appreciate any ideas anyone can provide,

  Sincerely

  Chris Santwani



Sat, 22 Feb 2003 15:17:10 GMT  
 Why does the VFP EXE run in the background after my program shuts down?

Actually, I am not using active transactions.  

Chris


  Maybe, just maybe, you have active transactions
  *---------------------------------------------------------------------------
  procedure ShutDown()
   _screen.WindowState = 2
   if( TRUE)
    if( (GetFormCount(TRUE) > 0) )
     MessageBox('Cannot close', MB_OK + MB_ICONEXCLAMATION ,_Box_Title())
     return
    endif
   endif
   if( !CloseDataBase() )
    MessageBox('Cannot close', MB_OK + MB_ICONEXCLAMATION ,_Box_Title())
    return
   endif

   clear events
   do while ( txnlevel() > 0 )
    rollback
   enddo

   release all

   quit
  endproc
  *---------------------------------------------------------------------------

    Hi,

    I had posted this question a few months ago but I am still having the same
    problem and I hope someone can help.    I have a VFP EXE that occasionally
    will keep running in the background (appears in the Windows Task Window)
    even after exit.  This is my shutdown routine:

     on error
     close all
     clear events
     release all
     quit

    I would appreciate any ideas anyone can provide,

    Sincerely

    Chris Santwani



Sat, 22 Feb 2003 18:56:08 GMT  
 Why does the VFP EXE run in the background after my program shuts down?
Please, don't post in HTML


|Actually, I am not using active transactions.  
|
|Chris
|

|  Maybe, just maybe, you have active transactions
|  *---------------------------------------------------------------------------
|  procedure ShutDown()
|   _screen.WindowState = 2
|   if( TRUE)
|    if( (GetFormCount(TRUE) > 0) )
|     MessageBox('Cannot close', MB_OK + MB_ICONEXCLAMATION ,_Box_Title())
|     return
|    endif
|   endif
|   if( !CloseDataBase() )
|    MessageBox('Cannot close', MB_OK + MB_ICONEXCLAMATION ,_Box_Title())
|    return
|   endif
|  
|   clear events
|   do while ( txnlevel() > 0 )
|    rollback
|   enddo
|  
|  
|   release all
|
|   quit
|  endproc
|  *---------------------------------------------------------------------------

|    Hi,
|
|    I had posted this question a few months ago but I am still having the same
|    problem and I hope someone can help.    I have a VFP EXE that occasionally
|    will keep running in the background (appears in the Windows Task Window)
|    even after exit.  This is my shutdown routine:
|
|     on error
|     close all
|     clear events
|     release all
|     quit
|
|
|    I would appreciate any ideas anyone can provide,
|
|    Sincerely
|
|    Chris Santwani
|
|



Sat, 22 Feb 2003 19:54:29 GMT  
 Why does the VFP EXE run in the background after my program shuts down?
Chris,
If this is your shutdown routine (called by ON SHUTDOWN DO ...), then I've
found the first line should really be:
ON SHUTDOWN

Also, if you had an active READ EVENTS, the CLEAR EVENTS line will cause the
program execution to continue at the line after the READ EVENTS, and your
last two lines:
RELEASE ALL
QUIT
will never be executed.

Rick


Quote:
> Hi,

> I had posted this question a few months ago but I am still having the same
> problem and I hope someone can help.    I have a VFP EXE that occasionally
> will keep running in the background (appears in the Windows Task Window)
> even after exit.  This is my shutdown routine:

>  on error
>  close all
>  clear events
>  release all
>  quit

> I would appreciate any ideas anyone can provide,

> Sincerely

> Chris Santwani



Sat, 22 Feb 2003 20:24:52 GMT  
 Why does the VFP EXE run in the background after my program shuts down?

Quote:
> Chris,
> If this is your shutdown routine (called by ON SHUTDOWN DO ...), then I've
> found the first line should really be:
> ON SHUTDOWN

> Also, if you had an active READ EVENTS, the CLEAR EVENTS line will cause
the
> program execution to continue at the line after the READ EVENTS, and your
> last two lines:
> RELEASE ALL
> QUIT
> will never be executed.

Granting that I may have packing-life's-belongings disease <g> but that
shouldn't matter since a program _will_ quit w/o a QUIT command once it gets
to the end of the instructions.  But, in any case, RELEASE ALL won't do a
CLEAR PROGRAM so the QUIT command should actually execute.

--

Nancy

Please post replies to the newsgroup
so everybody benefits from the
discussion.

Best viewed with a non-proportional font.

Quote:

> Rick



> > Hi,

> > I had posted this question a few months ago but I am still having the
same
> > problem and I hope someone can help.    I have a VFP EXE that
occasionally
> > will keep running in the background (appears in the Windows Task Window)
> > even after exit.  This is my shutdown routine:

> >  on error
> >  close all
> >  clear events
> >  release all
> >  quit

> > I would appreciate any ideas anyone can provide,

> > Sincerely

> > Chris Santwani



Mon, 24 Feb 2003 13:56:57 GMT  
 Why does the VFP EXE run in the background after my program shuts down?
It sounds like you might have an outstanding object reference.  If you have
occassion to assign an object to a property during your application, you
should be sure to set the property to .NULL. in the destroy method.

So, for example, if you have a custom form property called
oBtnCloseReference that gets set to point to an object, presumably a
commandButton the form needs to reference, then in the form's destroy() do:

this.oBtnCloseReference = .NULL.

I found that when a custom array type property holds object references that
I need to set each element to .NULL. before setting the array property to
.NULL. in order for the object references to release.  This was in 5.0 and I
don't actually know if it's still a problem in 6.0 SP4.

Specifically:

*!* Destroy()
FOR lni = 1 TO ALEN( this.aObjArray )
   this.aObjArray[lni] = .NULL.
NEXT lni

--

Nancy

Please post replies to the newsgroup
so everybody benefits from the
discussion.

Best viewed with a non-proportional font.


Quote:
> Hi,

> I had posted this question a few months ago but I am still having the same
> problem and I hope someone can help.    I have a VFP EXE that occasionally
> will keep running in the background (appears in the Windows Task Window)
> even after exit.  This is my shutdown routine:

>  on error
>  close all
>  clear events
>  release all
>  quit

> I would appreciate any ideas anyone can provide,

> Sincerely

> Chris Santwani



Mon, 24 Feb 2003 14:02:13 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Program Opens And Shuts After Running EXE

2. Shutting down an external program

3. How do you shut down another running application?

4. shut down from vfp

5. Shutting down Win95 from VFP 3.0b

6. Doing events during a long-running program

7. how to run .exe in background ?

8. run vfp .exe, program alway ask to convert resource 3.0 to 5.0

9. DO PROGRAM dialog comes up when running a VFP EXE

10. Running a VFP exe from another VFP exe

11. Shut down application at midnight

12. Fatal Exception Error and Shut Down

 

 
Powered by phpBB® Forum Software