How to tell if screen is portrait or landscape.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to determine if the user is looking at the pda/phone in portrait
or landscape. I found references to using GetSystemMetrics but I cannot see
how to add a reference that would enable me to use it. Does anyone have VB
code to determine the layout?

Thanks

Robert
 
Use Bounds instead of WorkingArea.

Otherwise, you'll end up treating square-screen devices like the Treo as
Landscape instead of Portrait since WorkingArea subtracts out shell stuff
like the title bar and menu bar.
 

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

Back
Top