带有C#.net CF中图像的按钮 [英] button with Image in C# .net CF
问题描述
如何将图像添加到C#.net CF中的按钮。
How to add a image to the button in C# .net CF.
我需要一个可以添加图像的按钮。
I need a button to which image can be added.
在普通的C#.net中,我们有与附加图像的按钮相关联的Image属性,但是在CF图像属性中没有thr,所以有人知道如何将图像添加到按钮。
In normal C# .net we have Image property associated with button to attach a image, but in CF image property is not thr, so is anybody know how to add a image to button.
谢谢和问候,
Harish
推荐答案
嗨哈里什,
查看此链接 http://msdn.microsoft.com/en-us /library/aa446518.aspx
check out this link http://msdn.microsoft.com/en-us/library/aa446518.aspx
有一个示例将图像作为按钮。
there is been an example to have image as button.
但是如果你想要文字以及图像,然后我们将不得不修改PAINT方法。
but if you want to have text as well as image, then we will have to modify the PAINT method.
你需要调用graphics.Drawstring(...)以及graphics.DrawImage(...)
you need to call graphics.Drawstring(...) along with the graphics.DrawImage(...)
祝你好运。
谢谢,
Vijay Aditya
Vijay Aditya
这篇关于带有C#.net CF中图像的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!