PDA

Click to See Complete Forum and Search --> : [RESOLVED] is .Kill() bad to use?


18experience
Dec 4th, 2009, 10:17 AM
I'm new to mobile development. When I click the X to close my program and then reopen it, the program reopens in the same state as I left it(including the text in textboxes, etc.). I would like for the program to restart each time I open it. So, I tried this:

System.Diagnostics.Process.GetProcessById(pid).Kill()

which works. However, since I'm new, I was wondering if this has any bad side effects. Is there some other method that I should be using to accomplish the desired result?

Thanks

petevick
Dec 4th, 2009, 03:49 PM
Hi,
by default, the minimize box on Windows Mobile is just that - change it to False, and your form will close. If it is your 'main form' then the application will close.

It will change from 'OK' to 'X'

18experience
Dec 4th, 2009, 04:24 PM
Thanks. I was actually posting this for a coworker, but he found the answer he was looking for in the meantime.