Determine Tablet PC screen mode

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
 
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

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top