Unexpected closing of forms

  • Thread starter Thread starter Daniel Man
  • Start date Start date
D

Daniel Man

Hi,
I've problem with opening and closing of forms. I have an
application with one main form, which displays list of
some database (xml data source) data. Another form is
designed for inserting and editing rows of datasource and
function of the last form is to show filtered list of
some other db table.
So the problem is: when i choose row in main form and
open editation form:

frmFault = new FrmFault(...);
frmFault.someMethod();
frmFault.ShowDialog();

and do some actions with device (for example incoming
phone call) the form is unexpectably closed.

Any suggestions?

Thanks a lot in advance.

Dan.
 
Are you sure the form is actually being closed and not simply losing focus?
Check the Settings > Memory > Running Programs to see if the form is listed.

Peter
 
Yes, am unfortunately sure! Sometimes This happens to
main form - whole app is closed. And I don't know why (i
think there's enough memory form application resources).

Thanks for idea. Any other solution, please?
 
Daniel,

Do you have a Closing event handler installed on that form so you know for
sure when this is happening? CE will close inactive apps if it needs the
memory.
 
Hi,
thanx for you answare. I dont have handler, so i will try
to find out, when the system is closing form. I've event
handler on main form, where I cancel event when it is not
made by user (user must use menu button File->Exit).
Your explanation (not enough memory) may be right (I also
thought that's it) but the system closes only the last
form and when I work with device more time second last
form is closed and so on - so application runs, system
only closes one form.

Thank a lot for all your time and answares.

Dan.
 
Back
Top