PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
How to tell if screen is portrait or landscape.
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
How to tell if screen is portrait or landscape.
![]() |
How to tell if screen is portrait or landscape. |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Just check the Screen.PrimaryScreen.WorkingArea's width and height.
-Chris "Rob" <Rob@discussions.microsoft.com> wrote in message news:6570C7D9-855D-436F-8122-BB8CA3E24AF1@microsoft.com... >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 |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thank you!
"Chris Tacke, MVP" wrote: > Just check the Screen.PrimaryScreen.WorkingArea's width and height. > > -Chris > > > "Rob" <Rob@discussions.microsoft.com> wrote in message > news:6570C7D9-855D-436F-8122-BB8CA3E24AF1@microsoft.com... > >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 > > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
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. -- -Robert Levy Program Manager, Consumer Productivity Experiences "Chris Tacke, MVP" <ctacke@spamfree-opennetcf.org> wrote in message news:%23Os$vEiQGHA.3804@TK2MSFTNGP15.phx.gbl... > Just check the Screen.PrimaryScreen.WorkingArea's width and height. > > -Chris > > > "Rob" <Rob@discussions.microsoft.com> wrote in message > news:6570C7D9-855D-436F-8122-BB8CA3E24AF1@microsoft.com... >>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 > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

