带有每个状态图像的工具条按钮

发布于 2024-09-26 18:47:53 字数 130 浏览 0 评论 0原文

我的应用程序中有一个 ToolSrip 和一些 ToolStripButtons。 我希望不仅添加基本图像,还添加一个用于悬停状态的图像和另一个用于单击状态的图像,如果可能的话,当鼠标悬停在按钮上时删除橙色背景...... 有可能吗? 提前致谢!

I have in my app a ToolSrip with some ToolStripButtons.
I wish add not only the basic image, but an image for the hover state and another for the clicked state, and if possible, remove the orange background when the button is hovered by the mouse...
it's possible?
thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

顾冷 2024-10-03 18:47:53

如果您查看按钮的事件,您可以看到各种事件,包括。这不是工作代码,它只是我脑海中的一个示例,但请查看链接。

private void Button1_OnMouseHover
{
   BackGroundImage = "test.png";
}

http://msdn.microsoft.com/en-us /library/system.windows.forms.toolstripbutton.aspx

If you look at the events of the button you can see various events including. This isnt working code its just a sample from my head but look at the link.

private void Button1_OnMouseHover
{
   BackGroundImage = "test.png";
}

http://msdn.microsoft.com/en-us/library/system.windows.forms.toolstripbutton.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文