Wrong form displayed after power off by user

M

microteq

Hello,

our application opens a main form (form1). The user can open another
form (form2) by clicking a button. When form2 is opened and the user
switches the power of the device off (standby), the program still
seems to run. But when the users powers on the device, then form1 will
be displayed instead of form2. But form2 is still waiting for input.
That's why our application hangs by waiting for an input of a form
which is not displayed.

How can we prevent this behaviour?

WM6, CF2.0, VB.NET2005

Many thanks for any advice.
Daniel.
 
J

Jin Chang

Hello,

our application opens a main form (form1). The user can open another
form (form2) by clicking a button. When form2 is opened and the user
switches the power of the device off (standby), the program still
seems to run. But when the users powers on the device, then form1 will
be displayed instead of form2. But form2 is still waiting for input.
That's why our application hangs by waiting for an input of a form
which is not displayed.

How can we prevent this behaviour?

WM6, CF2.0, VB.NET2005

Many thanks for any advice.
Daniel.

Not sure why the mix-up happens when you restore the device from the
standby mode, but you may want to try hiding the form1 when displaying
form2 if you're already doing so. You can then show then form1 when
form2 is closed. This also prevents multiple forms from being listed
when viewing the active applications.

If form2 is being displayed in a Modal-Dialog mode, then this problem
could be related to event-handling (message pump) being different
between the two forms. It's just a guess.

- Jin
 
M

microteq

Seems that this happens only, if the device (not the sim card) it
protected by a PIN.

- Daniel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top