471,344 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,344 software developers and data experts.

Killing process

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
3 2694
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
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
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.

Similar topics

10 posts views Thread by Jacek Popławski | last post: by
6 posts views Thread by Dakkar | last post: by
reply views Thread by Shruti A via .NET 247 | last post: by
3 posts views Thread by kunal.kewalramani | last post: by
6 posts views Thread by laststubborn | last post: by
2 posts views Thread by tony.newsgrps | last post: by
4 posts views Thread by Thomas Nelson | last post: by
6 posts views Thread by Roger Heathcote | last post: by
reply views Thread by Ronak mishra | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.