将在 Professional 和 Standard 上运行的 .NET Compact Framework 应用程序

发布于 2024-09-02 00:59:28 字数 160 浏览 1 评论 0原文

是否有关于创建可在专业(触摸屏)和标准(非触摸屏)设备上运行的应用程序的指导。

我有一个简单的应用程序,主要是文本和按钮,理论上应该能够在专业和标准设备上运行,几乎不需要任何修改。

IDE 似乎想让这变得困难甚至不可能,但我希望它是可能的。

有什么建议吗?

Is there any guidance on creating apps that will run on both professional (touch-screen) and standard (non-touch-screen) devices.

I have a simple application that is mostly text and buttons that in theory should be able to run on both professional and standard devices with little if any modification.

It seems the IDE wants to make this hard to impossible, but I expect it to be possible.

Any advice?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

z祗昰~ 2024-09-09 00:59:28

将项目的目标平台更改为“Windows CE”,这将关闭所有 IDE 过滤。然后,您将不得不担心设计器中表单等的大小,因为它们没有时髦的特定于设备的模拟器皮肤。然后您可以选择正确的目标设备,它仍然可以正常运行。

Change the project's target platform to "Windows CE" which will turn off all IDE filtering. You'll then have to worry about sizing the Forms, etc. in the designer since they won't have the snazzy device-specific emulator skin. You can then select the proper target device and it will still run normally.

明明#如月 2024-09-09 00:59:28

为了解决这个问题,我扩展了 Form 类,在 Form.KeyDown 事件中,它将 EventArgs 传递给所有实现 IHandleKeypress 的子级,直到其中一个子级消耗它(因为 KeyDown 事件总是发送到活动 Form,至少在 CE 4 上)。

实现该界面的自定义按钮有一个 AccessKey 属性,用于将设备键绑定到它。

To solve this issue I extended the Form class, in the Form.KeyDown event it passes the EventArgs to all Children implementing IHandleKeypress until one of them consumes it (because KeyDown events always get sent to the active Form, at least on CE 4).

The custom buttons implementing that interface have an AccessKey property to bind device keys to it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文