473,327 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 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 2824
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Jacek Pop³awski | last post by:
Hello. I am going to write python script which will read python command from socket, run it and return some values back to socket. My problem is, that I need some timeout. I need to say for...
6
by: Dakkar | last post by:
How can i control my program when someone kill it's process from the taskmanager my dispose script is working well if i close the program manually but if i kill it from taskmanager its not working...
0
by: Shruti A via .NET 247 | last post by:
hello group I have recently started working on .Net platform. I am facing one problem in killing and starting process from my aspx page. I am able to kill and start the same process from vb.net...
3
by: kunal.kewalramani | last post by:
I'm opening an Excel file using ASP.NET, but Excel process remains it is not killed, I tried killing it by using Quit() that is also not working, if anybody have any solution for this please help me...
10
by: shiry | last post by:
Hi, I need to do some important cleanup before my console application exists. I used the console ctrl event. This is working well and it fires for all cases, including the CTRL_CLOSE_EVENT (if I...
6
by: laststubborn | last post by:
Hi everybody, We have a very large database and high transaction volume. Time to time these transactions are locking each other and decrease the performance of the database. Is there any way...
8
by: Rain | last post by:
Does anyone know how i can kill a process using C#? im developing an asp.net web application using C# and the asp.net process doesnt die even if the application has already exited. So i need to...
2
by: tony.newsgrps | last post by:
Hi there, I'm trying to understand the impact of killing a process that owns a system mutex (used to ensure there is only 1 instance of my program running) Here is my code pretty much: try...
4
by: Thomas Nelson | last post by:
Hi, I'd like to start a program, run it for a while, then terminate it. I can do this on linux, but I'm new to working with windows. Here's my script: from subprocess import Popen from time...
6
by: Roger Heathcote | last post by:
sjdevnull@yahoo.com wrote: <snip> Fair point, but for sub processes that need to be in close contact with the original app, or very small functions that you'd like 100s or 1000s of it seems...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.