我想用winform做一个多媒体触摸屏幕程序界面
界面很简单 从0~9 九个按钮
下面一个文本框,求牛人帮做一个!
不行 帮我做个圆形按钮也可以,请提供详细代码!
界面很简单 从0~9 九个按钮
下面一个文本框,求牛人帮做一个!
不行 帮我做个圆形按钮也可以,请提供详细代码!
解决方案 »
- c# 开发数据量百万的抽奖系统
- 避免在一台机器上同时运行一应用程序的多个实例
- sql递归查询
- 文字转ASCII问题!回答就有分!高手进!给参考例子的话连昨天100分一起给
- 一个关于设计的问题
- 我想不起来了:有一个设置,放在程序的启动处,使button等控件编程XP式样,请指教?
- 请教各位大哥,帮我看看下面两个问题,谢谢!
- 类型转换难题,怎样根据控件类型名称转换到对应的控件
- sqlconnection连接超时,连接池溢出
- 想做这样一个功能,大家能不能给个思路
- 请大家推荐图书:从头到尾是一个完整实例,关于C# ASP.NET开发的
- ibatisnet 如何在后台记录日志时,写入每次执行的sql语句
下面一个文本框
还可以放“.”“clear”等按钮
然后给每个按钮加一个onclick事件
没click下给画面文本+=
private void button1_Paint(object sender, PaintEventArgs e)
{
System.Drawing.Drawing2D.GraphicsPath buttonPath = new System.Drawing.Drawing2D.GraphicsPath(); // Set a new rectangle to the same size as the button's ClientRectangle property.
System.Drawing.Rectangle newRectangle = button1.ClientRectangle; // Decrease the size of the rectangle.
newRectangle.Inflate(-10, -10); // Draw the button's border.
e.Graphics.DrawEllipse(System.Drawing.Pens.Black, newRectangle); // Increase the size of the rectangle to include the border.
newRectangle.Inflate(1, 1); // Create a circle within the new rectangle.
buttonPath.AddEllipse(newRectangle); // Set the button's Region property to the newly created circle region.
button1.Region = new System.Drawing.Region(buttonPath);
}
注意:需要调整按键的大小,最好是足够大的正方形的.
您好,能详细点 给出整个类的代码吗?比如说此方法在哪调用啊 等等!
因为我是作JAVA的。。对WINFORM了解确实很贫乏,WINFORM的后台还可以看看帮助然后写出来
界面确实不知道怎么搞!
您的那个按钮我试了虽然是像圆形,但是效果确实是惨不忍睹,不过还是十分感谢您!
求教哪位高手能帮我做个winform圆形按钮吗?最好能是圆形水晶按钮
再次谢谢。因为百度和GOOGLE上都没有这方面的资料。
是用Pictuurebox里面放一张圆形图片,只显示圆形图片的代码也可以
帮帮忙啊