Question

I have to stop applications when the window is closed. The window stays in the memory when click the (x) button. How can i remove the app in memory? Also another question is that i want the application to be installed when hard restart the pocket pc, how can i do it?

Thanks

Was it helpful?

Solution

By default the form will just hide when you click the X in the top right. You need to set the "MinimizeBox" property of the form to "False" for the application to close instead.

Installing the application on hard restart (often referred to as cold boot) requires that you put a CAB file for the application on the flash (persistent) memory of the device. You will then normally have to write a script and place that somewhere to call the CAB. This can vary from device to device so you'll have to look that one up.

OTHER TIPS

Setting the form's MinimizeBox property to False causes the OK button to appear. The Ok button is for closing the application instead of minimalizing

To prevent to application from minimizing which is the default behavior for PocketPC applications, set the MinimizeBox option to false on the form.

As for your second option that might be trickier because it depends on the PDA. If it has persistent memory you could put it there, and find a way to run the CAB file during initialization.

[Update] It would appear that there is a Startup Folder in the windows menu. Perhaps you could write a utility that checks if your application is installed and if not launches the CAB installer.

The default behavior is indeed minimizing the application. Using a custom task manager which replaces the [x] you can tune this behavior. Some vendors (for instance HTC) include a custom taskmanager exactly for this purpose.

A generic but good task manager is WkTASK, here is the relevant feature description:

X button
Using the X button, you can use some actions as follows:

  • Tap: really close
  • Tap&Hold: show context menu
  • Drag: some gestures (To show a program launcher, drag toward down. To show Today, drag toward left.)

WkTASK offers a lot more, but you can fine tune it to do only what you want.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top