How to properly close an application

UncleRonin

Well-known member
Joined
Feb 28, 2006
Messages
230
Location
South Africa
Programming Experience
5-10
How do you close an application so that it no longer uses ANY memory at all? Does Close() work for this? Or must you Dispose() of each and every other control and component?
 
Okay. How do you open the task manager on a mobile device? By 'close your main form' do mean use the Close() method or the Dispose() method? I did a test using each of the methods and Close() did not clear all the allocated memory. Dispose(), however, did.
 
UncleRonin said:
Okay. How do you open the task manager on a mobile device? By 'close your main form' do mean use the Close() method or the Dispose() method? I did a test using each of the methods and Close() did not clear all the allocated memory. Dispose(), however, did.

Settings...Memory...Running Programs

To close an app in code use the Application.Exit() method. Read up on why you should not close Pocket PC apps as they are designed to be minimized (which is what the X is, it's not close, but minimize). If you set MinimizeBox (or whatever it's called) to False, you'll see an OK at the top right, which is more like a close.
 
If your pocket pc have a software call spd it will auto help you close all the application when you tap on "X" button.
 
Back
Top