如何在 Winform C# 上创建带有圆角/边缘的按钮? [英] How do I create button with rounded corners/edges on Winform C#?

查看:56
本文介绍了如何在 Winform C# 上创建带有圆角/边缘的按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我将在按钮上放置一个图像,该图像具有圆角.我该如何做到这一点?我一直在谷歌上搜索并搜索了几个小时,但仍然没有运气.

Well I'll be putting an image on the button, and that image has rounded corners. How do I make this happen? I've been googling and searching for hours, still no luck on it.

推荐答案

如果你想坚持 windows 窗体,那么你应该使用一个图片框,并在悬停时制作一些动画.当你点击它时,它会像一个按钮.

If you want to stick to windows forms, then you should use a picturebox and make some animations on hover etc. When you click it, it will function like a button.

或查看这些文章:

http://www.codeproject.com/文章/15730/RoundButton-Windows-Control-Ever-Decreasing-Circlehttp://www.codeproject.com/Articles/10303/Elliptical-Circular-Button

但是,如果您想要更好的布局,也可以使用 WPF,但它与 Windows 窗体有些不同.

However you could also use WPF if you want a nicer layout, but it's somewhat different from windows forms.

这篇关于如何在 Winform C# 上创建带有圆角/边缘的按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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