By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,304 Members | 3,174 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,304 IT Pros & Developers. It's quick & easy.

Killing process

P: n/a
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
Jul 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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/...-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
--
http://www.danielmoth.com/Blog/
"Andreas" <An*****@discussions.microsoft.com> wrote in message
news:B5**********************************@microsof t.com...
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


Jul 21 '05 #2

P: n/a
I want to handle the click on OK button and prevent the application from
closing but after catching the event and returning from it, the
application closes again. I can't prevent closing. any suggestions?

*** Sent via Developersdex http://www.developersdex.com ***
Jul 22 '05 #3

P: n/a
I want to handle the click on OK button and prevent the application from
closing but after catching the event and returning from it, the
application closes again. I can't prevent closing. any suggestions?

*** Sent via Developersdex http://www.developersdex.com ***
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.