Determine Tablet PC screen mode

  • Thread starter Thread starter SetonSoftware
  • Start date Start date
S

SetonSoftware

I'm developing a VB.NET 2005 WinForms application that will run on a
tablet PC. I want to build a screen resizer method that will position
the forms and controls properly depending on whether the display is in
landscape mode (using the tablet like a notebook with keyboard) or
portrait mode (using the tablet, well, as a tablet). I can trap when
the user flips the display via the SystemEvents.DisplaySettingsChanged
event. The problem is I can't determine the difference between
portrait and landscape modes. The PrimaryScreen.WorkingArea.Width and
PrimaryScreen.WorkingArea.Height both return the same values
regardless of how the display is set.

How do I determine which mode I'm in so I can resize things
accordingly?

Thanks

Carl
 
I'm developing a VB.NET 2005 WinForms application that will run on a
tablet PC. I want to build a screen resizer method that will position
the forms and controls properly depending on whether the display is in
landscape mode (using the tablet like a notebook with keyboard) or
portrait mode (using the tablet, well, as a tablet). I can trap when
the user flips the display via the SystemEvents.DisplaySettingsChanged
event. The problem is I can't determine the difference between
portrait and landscape modes. The PrimaryScreen.WorkingArea.Width and
PrimaryScreen.WorkingArea.Height both return the same values
regardless of how the display is set.

How do I determine which mode I'm in so I can resize things
accordingly?

Thanks

Carl

OK, I posted before doing sufficient research. Here is the solution:

http://msdn.microsoft.com/en-us/library/ms812142.aspx
 
Back
Top