tags:

views:

614

answers:

4

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

A: 

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.

Garry Shutler
Thanks for the quick reply, minimizebox should work but i don't know how to write that script for hard restart. Is there any resource that i can check for it?
mehmetserif
Like I say it varies from device to device, your best bet is to hit the manufacturer's website or contact them directly for help. They are generally very helpful to get software written for their devices.
Garry Shutler
Well this device has a folder named AutoInstall, so i can install apps in this folder except .NET Compact Framework, sql ce can also be installed but for .NET CF i have to install it manually. Do you know why?
mehmetserif
No, normally if you can find a way to install one CAB it will install any.
Garry Shutler
A: 

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

PoweRoy
A: 

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.

Conrad
If you hard reset it will normally reinstall Windows as that is on the non-persistent memory, wiping the Startup folder.
Garry Shutler
A: 

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.

Davy Landman