"Running Programs" on Windows Mobile
-
Greetings: I am developing a fairly simple application on a Fujitsu Siemens Loox 720 Pocket PC running Windows Mobile 2003. I am using Visual Studio 2003 with a project configured for Smart Devices using C#.NET. OK, I have noticed a strange problem and I find it is repeatedable with the simplest of programs and also with applications that come with the operating system like "File Explorer". All you have to do is run these programs ONCE and then close them again immediately. Now, my Loox 720 comes with a utility program called "Running Programs". I start this program and it lists the applications that are, apparently, running. What I am finding is that my program remains on this list even after I have closed it. My impulse would be to check for un-released resources allocated from my application, but I must emphasis, I have reproduced this problem with a simple program that does nothing else but put a Windows Form on the display and lets you close it. It also happens with File Explorer. Try it: Start File Explorer, close it, then check "Running Programs" - there it is! I wouldn't really care about this but I find that when I need to deploy my application, if I run the application and then try to make a change and then deploy it again, it won't let me! I have tried to delete the program EXE file from the Program Files directory but the PDA won't let me saying that the program is in use! I have to start the "Running Programs" utility and FORCE it to close before the PDA will allow me to delete or update the EXE! That is NOT going to make development easy. Can anybody shed some light on this issue? Why do certain programs that run on the PDA APPEAR to close but remain running to some extent? How can I write MY simple application so that when it is closed, it actually CLOSES? Thank you in advance for your response. Mark
-
Greetings: I am developing a fairly simple application on a Fujitsu Siemens Loox 720 Pocket PC running Windows Mobile 2003. I am using Visual Studio 2003 with a project configured for Smart Devices using C#.NET. OK, I have noticed a strange problem and I find it is repeatedable with the simplest of programs and also with applications that come with the operating system like "File Explorer". All you have to do is run these programs ONCE and then close them again immediately. Now, my Loox 720 comes with a utility program called "Running Programs". I start this program and it lists the applications that are, apparently, running. What I am finding is that my program remains on this list even after I have closed it. My impulse would be to check for un-released resources allocated from my application, but I must emphasis, I have reproduced this problem with a simple program that does nothing else but put a Windows Form on the display and lets you close it. It also happens with File Explorer. Try it: Start File Explorer, close it, then check "Running Programs" - there it is! I wouldn't really care about this but I find that when I need to deploy my application, if I run the application and then try to make a change and then deploy it again, it won't let me! I have tried to delete the program EXE file from the Program Files directory but the PDA won't let me saying that the program is in use! I have to start the "Running Programs" utility and FORCE it to close before the PDA will allow me to delete or update the EXE! That is NOT going to make development easy. Can anybody shed some light on this issue? Why do certain programs that run on the PDA APPEAR to close but remain running to some extent? How can I write MY simple application so that when it is closed, it actually CLOSES? Thank you in advance for your response. Mark
Jethro63 wrote:
Can anybody shed some light on this issue? Why do certain programs that run on the PDA APPEAR to close but remain running to some extent? How can I write MY simple application so that when it is closed, it actually CLOSES?
The little 'X' in the topright corner does not close the program, it only minimizes it. Dialog-based programs generally have a small 'ok' button up there, which maps to OnOK -> AppExit. You should be able to add the 'ok' button to your SDI based app with SHDoneButton(GetSafeHwnd(), SHDB_SHOW); when creating the CMainFrame class (or handle it via menus, etc). --- "Man will never be free until the last king is strangled with the entrails of the last priest". -- Denis Diderot
-
Jethro63 wrote:
Can anybody shed some light on this issue? Why do certain programs that run on the PDA APPEAR to close but remain running to some extent? How can I write MY simple application so that when it is closed, it actually CLOSES?
The little 'X' in the topright corner does not close the program, it only minimizes it. Dialog-based programs generally have a small 'ok' button up there, which maps to OnOK -> AppExit. You should be able to add the 'ok' button to your SDI based app with SHDoneButton(GetSafeHwnd(), SHDB_SHOW); when creating the CMainFrame class (or handle it via menus, etc). --- "Man will never be free until the last king is strangled with the entrails of the last priest". -- Denis Diderot
Hi Jonas: Thanks for your response. Its funny but barely minutes ago, I read a technical article on the MSDN web site entitled: "Differences in Microsoft .NET Compact Framework Development between the Pocket PC and Windows CE .NET" In this article, I found that your solution will work, OR, you can go to the property sheet for the main form and change "Minimize" from True to False. This will REPLACE the 'X' with an 'Ok', which closes the application. This will suit my purposes as I do not need to be able to minimize my application. Thanks again, Mark