Unexpected Closing of Application

  • Thread starter Thread starter Robert Shidla
  • Start date Start date
R

Robert Shidla

I have an CF application that if the application is left running but unused
for a few hours it will not load again until a soft reset completed.

Basically, users leave the app running over night, and in the morning the
application is NOT shown in "running programs" and it will not run by
clicking on the exe. Once the user Soft Resets the device everything is
working again.

Also, this only happens a handful of times and not every night. I have this
application running on a few dozen devices everyday. I have disabled the
today screen from opening after the device has been off for a few minutes.

I am already overriding the OnClosing event in all my forms, because I found
the OS liked to clean up (close) a few forms that I had/needed open.

Any ideas?

Robert Shidla
 
Due to the PPC architecture applications are closed as other ones are run
based on the need for memory.

I'm not sure how you'd 'force' an app to stay open. Everything I've heard
from MS is that you should design your application to exit gracefully.

// Dave




I have an CF application that if the application is left running but unused
for a few hours it will not load again until a soft reset completed.

Basically, users leave the app running over night, and in the morning the
application is NOT shown in "running programs" and it will not run by
clicking on the exe. Once the user Soft Resets the device everything is
working again.

Also, this only happens a handful of times and not every night. I have this
application running on a few dozen devices everyday. I have disabled the
today screen from opening after the device has been off for a few minutes.

I am already overriding the OnClosing event in all my forms, because I found
the OS liked to clean up (close) a few forms that I had/needed open.

Any ideas?

Robert Shidla
 
-----Original Message-----

Due to the PPC architecture applications are closed as other ones are run
based on the need for memory.

I'm not sure how you'd 'force' an app to stay open. Everything I've heard
from MS is that you should design your application to
exit gracefully.

Hmmm... Not good, not good at all. My message to MS would
be that they can't anticipate all the possible uses and
therefore should give people a way out of this kind of
situation.

Looks like I'll have some additional testing to do
concerning this, otherwise all hell could break loose when
my app hits the field.
 
I'm sure there's a way around it, I'm just not sure what it is. My app also
shouldn't ever be closed for my users, but I've a decent job of making sure
the proper forms are closed when not needed, etc.

Hopefully someone can help out more than I have and give the proper answer.
:)

// Dave


-----Original Message-----

Due to the PPC architecture applications are closed as other ones are run
based on the need for memory.

I'm not sure how you'd 'force' an app to stay open. Everything I've heard
from MS is that you should design your application to
exit gracefully.

Hmmm... Not good, not good at all. My message to MS would
be that they can't anticipate all the possible uses and
therefore should give people a way out of this kind of
situation.

Looks like I'll have some additional testing to do
concerning this, otherwise all hell could break loose when
my app hits the field.
 
-----Original Message-----
I stopped all my dialogs from being closed with the
OnClosing event. To keep your app from prematurely
exiting, do the same in the OnClosing event of the main
form (the one passed to Application.Run).

Giving this a try "as we speak" - thanks for the tip!

Michel
 
How do your users close the forms ?By using the X button on right of the
form or is it OK button?
if it is X button the form is just minimized(not closed) so you have lots of
unused forms,and
memory manager in Pocket Pc cleans memory by quiting your program.
 
I don't close my forms. I have built my own navigation, that will minimize
forms as the user walks through the application. I understand the the OS
closes my application when I don't want it to, but I don't understand that
after the OS closes my application I can't start it again without doing a
hard reset?

I guess that I need to listen for when the OS is trying to close my app, and
do it nicely myself.

Robert
 
Back
Top