473,397 Members | 2,056 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,397 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 2827
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.