两链李个image标签绑定同一个点击事件,根据data的值(true或false)在点击事件里面进行图片切换。
为了区分,里面图片路径用单引号肆瞎,外面src用双引号。
'事先找的2张图片的路径'C:\Program Files\Tencent\QQ\244326867\CustomFace\F4F0C0B353BCE7228DAFD104BDCDBE87.jpg
'C:\Program Files\祥神正Tencent\QQ\244326867\CustomFace\F4F0C0B353BCE7228DAFD104BDCDBE87fixed.bmp
Dim a As Integer
Private Sub Command1_Click()
tp1 = "C:\Program Files\Tencent\QQ\244326867\CustomFace\瞎尘F4F0C0B353BCE7228DAFD104BDCDBE87.jpg"
tp2 = "C:\Program Files\Tencent\QQ\244326867\CustomFace\谨悔F4F0C0B353BCE7228DAFD104BDCDBE87fixed.bmp"
If a = 1 Then
a = 2
Picture1.Picture = LoadPicture(tp1)
Else
a = 1
Picture1.Picture = LoadPicture(tp2)
End If
End Sub
Private Sub Form_Load()
a = 1
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)