N
nicowyow
Hi,
I'm building an application that should always run in landscape mode
using compact framework 2. I came up with this:
private void Form1_Resize(object sender, EventArgs e)
{
if (SystemSettings.ScreenOrientation != ScreenOrientation.Angle270);
SystemSettings.ScreenOrientation = ScreenOrientation.Angle270;
}
but that throws an exception, so I put it in an GotFocus event, which
seems out to work just fine, on the emulator. However, that event is
never fired on my PDA.
Anyone has a clue why setting ScreenOrientation results in an exception
when it is assigned a value during OnResize or why GotFocus isn't
called on my PDA? Or is there any other way to lock the value of
ScreenOrientation?
Thanks for any input...
Nico
I'm building an application that should always run in landscape mode
using compact framework 2. I came up with this:
private void Form1_Resize(object sender, EventArgs e)
{
if (SystemSettings.ScreenOrientation != ScreenOrientation.Angle270);
SystemSettings.ScreenOrientation = ScreenOrientation.Angle270;
}
but that throws an exception, so I put it in an GotFocus event, which
seems out to work just fine, on the emulator. However, that event is
never fired on my PDA.
Anyone has a clue why setting ScreenOrientation results in an exception
when it is assigned a value during OnResize or why GotFocus isn't
called on my PDA? Or is there any other way to lock the value of
ScreenOrientation?
Thanks for any input...
Nico