Killing process

G

Guest

Hi,

I just created my first vb.net pocket pc application - that consists of a
main dialog and an additional dialog that is defined globally like this:

Dim x as New MyTestDialog

As the dialog's constructor takes a lot of time to do all that is necessary,
it is called only one time when the process starts - and I just call
ShowDialog any time I need to display it to the user.
But, when the application is closed by the user - the process somehow seems
to remain active (as e.g. the executable is not deletable, the Form_load
handler of the main form is not called again,...). I tried to Dispose() the
additional form - but nethertheless the problem remains.
As the .net compact framework does not contain a Process class - can anyone
tell me how I can just kill myself (my own process)?

Thanks
Andreas
 
D

Daniel Moth

1. If your main form has MinimizeBox = true, then your app does not exit
when the user clicks on X, rather gets smart-minimised as per the guidelines
of the PPC platform.
2. The correct way to exit a CF app is by closing the main form (e.g.
Me.Close). The main form is the one you passed to Application.Run
3. Regardless of the above, if you are using worker threads (any thread
other than the UI one) you must make sure they have exited or the process
will not shutdown properly
4. Since you want to create a form once and cache/reuse it, it is best to
use Show (not ShowDialog) and then Hide/Show as appropriate

Finally, it sounds like you are a desktop developer moving to CF for PPCs
(apologies if I got that wrong) so this may be of use:
http://www.danielmoth.com/Blog/2005/01/desktop-to-ppc-part.html

If you follow-up please remove the other groups.. CF ng is the only
applicable one for your question.. thanks

Cheers
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