Designing a “Landscape application” for a Pocket PC

梦想与她 提交于 2019-12-11 12:26:57

问题


I would like to create an app for a pocket pc.

One of the features is that the user should rotate the pocket pc 90 degrees counterclockwise to opearate normally the app

How can someone design a "counterclockwise rotated" application with Visual studio? Is there any option in VS that i am missing?


回答1:


In your project, add a reference to Microsoft.WindowsCE.Forms. Next, add a form and make it 320 (w) x 240 (h). Add "using Microsoft.WindowsCE.Forms;" to the top of your Program.cs file. In your Main() method (before the form is loaded) add this line:

SystemSettings.ScreenOrientation = ScreenOrientation.Angle90;

(it may be Angle270 you want - I don't remember offhand). When your app closes, you'll probably want to set the orientation back to Portrait.



来源:https://stackoverflow.com/questions/1114905/designing-a-landscape-application-for-a-pocket-pc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!