Landscape vs Portrait

  • Thread starter Thread starter Mary White via DotNetMonster.com
  • Start date Start date
M

Mary White via DotNetMonster.com

I have a Pocket PC 2003 application, that uses the form's resize event to
detect a change from portrait to landscape (and vice versa).

If I have a control (panel or textbox but not a label) that extends past
the bottom of the screen (188 pixels), I automatically get a vertical
scrollbar, which I do not want because I already have a vertical scrollbar
controlling the panel.

I didn't think that autoscroll was enabled in the compact framework -- and
I cannot find a way to turn this off. Any ideas.

Mary White
 
Darren,

Thank you for the blog (I found it useful for other purposes).

In this case, my device supports screen rotation and I want my application
to function in both orientations.

Currently, my application detects the change of screen orientation and
takes action based on the change.

The problem is that when the device is in landscape, I am automatically
getting a vertical scrollbar that I do not want.

Mary
 
Mary,

Here's why you get the scrollbar: (from
http://msdn.microsoft.com/library/?url=/library/en-us/dnwm2k3/html/orientation_dpi_aware_apps.asp)

Whether an application is "legacy" is determined by the subsystem version
information in the executable header. By default, applications compiled with
the Windows Mobile 2003 SDKs and earlier set this value to 4.20 or lower; in
future releases of the Pocket PC SDK, this value will be set to 4.21 and
higher. Applications with a subsystem version of 4.20 or lower are
considered legacy applications and will get scrollbars.

So once CE5 arrives, you'll have more control over this.
 
In your handler for screen rotation, move/resize the controls on your form
so that they do not extend beyond the bottom of the screen. We only add a
scrollbar when one is needed.

--
Robert Levy
Program Manager
Mobile Devices Product Group
http://blogs.msdn.com/windowsmobile

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top