设计“风景应用".用于掌上电脑 [英] Designing a "Landscape application" for a Pocket PC

查看:113
本文介绍了设计“风景应用".用于掌上电脑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为掌上电脑创建一个应用程序.

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

其中一项功能是,用户应将掌上电脑逆时针旋转90度以正常显示应用程序

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

某人如何使用Visual Studio设计逆时针旋转"应用程序? 我在VS中有没有其他选择?

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

推荐答案

在您的项目中,添加对Microsoft.WindowsCE.Forms的引用.接下来,添加一个表格并将其设置为320(w)x 240(h).添加使用Microsoft.WindowsCE.Forms;"到Program.cs文件的顶部.在您的Main()方法中(在加载表单之前)添加以下行:

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;

(您想要的可能是Angle270-我记不清了.)应用关闭时,您可能需要将方向设置为纵向".

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

这篇关于设计“风景应用".用于掌上电脑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆