PDA

View Full Version : .net fullscreen application on HTC Diamond


TomRR
17th June 2009, 02:40 PM
Hi,

I'm working on programm with .NET Framework 3.5 for my HTC Touch Diamond 2.

Now I need help on two issues:

1. Fullscreen (hide taskbar)
I set WindowState to Maximized and FormBorderStyle to None.
This works on the emulator. On the emulator, the form is maximized and the taskbar is not visible anymore.
However, when I run the same programm on my htc diamaond 2 the taskbar is still visible! Does anyone know what the problem is?


2. Form.Closing
In the form closing event I want to show a message box "Are you sure". If the user clicks 'no', I want the application to not close.
For this purpose I cancel the CancelEvent: e.Cancel = true;
But this doesn't work: The from gets closed anyway but the application process keeps running in background. The programm doesn't appear in taskmanager running applications but only in running processes. So I cannot switch back to my application.
Any hints how I can manage this?


Thanks
Tom

TomRR
20th June 2009, 10:33 AM
noone got any experience with this issues??:mad:

PhantomDj
20th June 2009, 02:18 PM
Hi,


2. Form.Closing
In the form closing event I want to show a message box "Are you sure". If the user clicks 'no', I want the application to not close.
For this purpose I cancel the CancelEvent: e.Cancel = true;
But this doesn't work: The from gets closed anyway but the application process keeps running in background. The programm doesn't appear in taskmanager running applications but only in running processes. So I cannot switch back to my application.
Any hints how I can manage this?


Thanks
Tom

From my Windows programing experience (not WM though) your code should go like this:
Step1: Bring up a dialog box with your question
Step2: Main form is waiting for the result of the dialog box
Step3: Once the main form gets the result THEN it decides what to do: Exit or "nothing"

What I want to say is that you should not "cancel" the event. You should not generate it in first place if the user does not click on "Yes, I'm sure"

TomRR
20th June 2009, 02:59 PM
Thanks for your response.

As far as I know, I cannot prevent the closing event to be raised when the user clicks the 'x' in the taskbar.