M
Manfred Denzer
Hello!
I develop with C# and the .NET Compact Framework for Windows Mobile in
Microsoft Visual Studio 2005 and I have some very basic questions:
### -> 1. How do I start an application and react to an
OutOfMemoryException?
This is my code at the moment:
static void Main() {
form = new MyForm();
startForm();
}
private static void startForm() {
try {
Application.Run(form);
} catch (OutOfMemoryException) {
// de-allocate resources...
startForm();
}
}
This code doesn't work. If an OutOfMemoryException is thrown, the
application exit.
### -> 2. How can I close and restart an application?
If my application is running and I press the "Home" button of my PDA
and work in other application, I can go back to my application with
starting it a second time. This works!
But how can I "minimize" my application manually? I want to add a
button "Back to Windows" in my application.
### -> 3. I have only a process - how to make an application?
There is a Task Manager in Windows Mobile 6.1. If I start my
application, go back to windows and start the Task Manager, there's no
application in the list. If I switch to "Show -> Processes", I see the
"myApp.exe". I want to have my application is in the application list
and not only in the process list.
Thank you very much for your help!
Manfred
I develop with C# and the .NET Compact Framework for Windows Mobile in
Microsoft Visual Studio 2005 and I have some very basic questions:
### -> 1. How do I start an application and react to an
OutOfMemoryException?
This is my code at the moment:
static void Main() {
form = new MyForm();
startForm();
}
private static void startForm() {
try {
Application.Run(form);
} catch (OutOfMemoryException) {
// de-allocate resources...
startForm();
}
}
This code doesn't work. If an OutOfMemoryException is thrown, the
application exit.
### -> 2. How can I close and restart an application?
If my application is running and I press the "Home" button of my PDA
and work in other application, I can go back to my application with
starting it a second time. This works!
But how can I "minimize" my application manually? I want to add a
button "Back to Windows" in my application.
### -> 3. I have only a process - how to make an application?
There is a Task Manager in Windows Mobile 6.1. If I start my
application, go back to windows and start the Task Manager, there's no
application in the list. If I switch to "Show -> Processes", I see the
"myApp.exe". I want to have my application is in the application list
and not only in the process list.
Thank you very much for your help!
Manfred