我刚学vb正在用vb6.0做个小游戏,想在commandbutton按钮上加两个图片,点击一下按钮出来图片1,再点击一下按钮出来图片2,但是由于图片比按钮大,所以按钮只显示图片的一小部分。我想让图片自动缩小到跟按钮同样大,按钮上显示整个图片,按钮大小不变。请问谁又没有办法,请给于指导,最好是详细些的加些代码说明。
谢谢!
我把图片放在image中,再把image是属性stretch设置为true,然后再把image付给Command4.Picture
我代码如下:
Private Sub Command4_Click()
If Command4.Tag = "2" Then
Command4.Tag = "1"
Command4.Picture = Image1
Else
Command4.Tag = "2"
Command4.Picture = Image2
End If
End Sub
结果按钮还是显示图片的一部分,郁闷呀,哪位帮帮忙……