C# - 图像作为一个可点击的按钮 [英] C# - Image as a clickable button

查看:130
本文介绍了C# - 图像作为一个可点击的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打一些自定义的控制,再加上图像作为按钮。我不想上的按钮图像 - 我想完全从文件中读取一个图像替换的按钮。
这可能吗?

I want to make some custom controls, with images as buttons. I don't want images ON buttons - I want to totally replace the button with an image read from a file. Is it possible?

推荐答案

您可以使用<$c$c>PictureBox控制和使用<$c$c>Click它的事件处理点击。

You can use the PictureBox control and use the Click event on it to handle clicks.

这篇关于C# - 图像作为一个可点击的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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