gpt4 book ai didi

c# - 如何在 Winform C# 上创建带圆角/圆边的按钮?

转载 作者:太空狗 更新时间:2023-10-29 21:44:49 50 4
gpt4 key购买 nike

好吧,我会在按钮上放一张图片,这张图片有圆角。我该如何做到这一点?我一直在谷歌搜索和搜索几个小时,仍然没有运气。

最佳答案

您可以使用 Microsoft Visual Basic PowerPacks 中的矩形形状.

How to: Draw Shapes with the OvalShape and RectangleShape Controls 处有文档

我检查过它在 Windows7 x64 上的 VS2013 Express for Windows Desktop 的 C# Windows 窗体项目中工作,同时针对 x86 和 x64。用户xam报告说它也适用于 VS2017。

private void rectangleShape1_Click(object sender, EventArgs e)
{
MessageBox.Show("Click!");
}

When the program is run

为方便起见,您可以添加一个新的工具箱选项卡并将 VB PP 控件添加到其中。

关于c# - 如何在 Winform C# 上创建带圆角/圆边的按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21121968/

50 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com