请教,如何判断picturebox中载入的是某个图像,谢谢
CmdPause是一个pictureBox,载入图像作为暂停、继续的图像按钮,在点击时先作判断来决定载入的图像,即如果当时是“暂停”图像,点击后被“继续”图像代替,与之相反。
我作如下处理,无效,肯定是不能这样判断,但实在毫无办法,请指教,谢谢
Private Sub CmdPause_Click()
If CmdPause.Picture = LoadPicture(App.Path +"\images\pause.gif"then'暂停
Timer1.Enabled = False
CmdPause.Picture = LoadPicture(App.Path + "\images\go.gif") '继续
Picture1.Enabled = False
Else
Timer1.Enabled = True
CmdPause.Picture = LoadPicture(App.Path + "\images\pause.gif '暂停
Picture1.Enabled = True
Text1(TextIndex).SetFocus
End If
End Sub