Windows Mobile 5 SDK按钮控件 [英] Windows Mobile 5 SDK Button Control

查看:86
本文介绍了Windows Mobile 5 SDK按钮控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个相当新手的程序员,正在开发我的第一个Windows Mobile应用程序。我看到我的程序没有可用的按钮控件。我以前从未创建过自定义控件,并且我知道这是我可以为自己的应用程序获取按钮的唯一方法(这是我的客户的要求)。我想知道是否有人可以快速介绍如何创建此功能。我将Visual Studio 2005与Windows Mobile 5 SDK一起使用,创建了要在非触摸屏设备上部署的应用程序。

I'm a fairly novice programmer working on my first Windows Mobile application. I see that there is no button control available for my program. I've never created a custom control before, and I understand that is the only way that I can get a button for my application (it is a requirement as per my client). I was wondering if someone could give me a quick walk through on how I would create this. I'm using Visual Studio 2005 with the Windows Mobile 5 SDK, creating an application that is to be deployed on non-touchscreen devices.

在此先感谢您的帮助您可以提供。

Thank you in advance for any help you can provide.

更新:由于需要操纵的数据量,按钮控件对于该项目是更好的选择很快。有七个带有计数器标签的部分,每个标签旁边是一组三个按钮。一个按钮增加标签上的int,而花药减小它,第三个按钮让用户输入要分配给标签的int值。我尝试开发一个菜单系统来控制所有这些功能,但是菜单最终嵌套得太深,因此快速进行更改很重要。

Update: A button control is a better option for this project, due to the amount of data that needs to be manipulated quickly. There are seven sections with a counter label, and next to each label is a set of three buttons. One button increases the int on the label, anther decreases it, and the third lets the user input an int value to assign to the label. I tried developing a menu system to control all this, but the menu ended up being nested too deep, and quick access to making a change is important.

我想出了如何通过创建用户控件来创建一个非常基本的按钮,现在我遇到了使控件上的标签在属性窗口中更改的问题。

I figured out how to make a very basic button by creating a user control, now I am having issues making the label on the control changeable in the properties window.

推荐答案

您显然正在使用Smartphone SDK进行开发,其中没有可用的按钮。如果您使用PocketPC SDK,则将有一个按钮。这些SDK已在Windows Mobile 6中重新命名为Standard和Professional。

You are obviously developing with the Smartphone SDK, where no button is available. If you'd use the PocketPC SDK, then you'd have a button. These SDKs have been renamed to Standard and Professional alternatively in Windows Mobile 6.

老实说,我不建议在Smartphone应用程序中使用按钮。您可以向您的客户说明在Smartphone应用程序中使用按钮违反Windows Mobile准则,而应改用菜单。这比必须导航到该按钮然后单击它要快得多。

To be honest, I wouldn't recommend using a button in a Smartphone application. You could explain to your client that it is against the Windows Mobile guidelines to use a button in Smartphone applications and that the menu should be used instead. This is much quicker than having to navigate to the button and then clicking it.

如果客户端坚持要求,则创建一个继承自Control类的类并覆盖OnPaint事件。

If the client insists on it, create a class that inherits from the Control class and override the OnPaint event.

这篇关于Windows Mobile 5 SDK按钮控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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