VB NET 图像作为按钮
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19151524/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
VB NET image as button
提问by Chozo Qhai
I'm going to change the image of button_original to button_clicked's image. how do I change the image(button) when I click them ? Should I need to use picture box anything else ?
我要将 button_original 的图像更改为 button_clicked 的图像。单击它们时如何更改图像(按钮)?我还需要使用图片框吗?
回答by Nadeem_MK
In vb.NET, if you're using an image on a button, to change it, you can change the property Imageof the button in the Button_Click()event.
在 vb.NET 中,如果您在按钮上使用图像,要更改它,您可以property Image在Button_Click()事件中更改按钮的。
Private Sub Button_Click(sender As Object, e As EventArgs) Handles Button.Click
Button.Image = ... <- your image
End Sub

