VB大师帮我看看代码
来源:百度知道 编辑:UC知道 时间:2024/05/25 15:00:58
Private Sub Command2_Click()
On Error GoTo a
APicture.Visible = True
If Picture1.Visible = "True" Then
APicture.Picture = LoadPicture(App.Path + "\文字图片\狮.jpg")
ElseIf Picture2.Visible = "True" Then
APicture.Picture = LoadPicture(App.Path + "\文字图片\狗.jpg")
Else
APicture.Picture = LoadPicture(App.Path + "\文字图片\猫.jpg")
End If
End Sub
a: MsgBox "请把“文字图片”文件夹和执行文件放在同一目录下"
End Sub
总达不到我想象的效果。
On Error GoTo a
APicture.Visible = True
If Picture1.Visible = "True" Then
APicture.Picture = LoadPicture(App.Path + "\文字图片\狮.jpg")
ElseIf Picture2.Visible = "True" Then
APicture.Picture = LoadPicture(App.Path + "\文字图片\狗.jpg")
Else
APicture.Picture = LoadPicture(App.Path + "\文字图片\猫.jpg")
End If
End Sub
a: MsgBox "请把“文字图片”文件夹和执行文件放在同一目录下"
End Sub
总达不到我想象的效果。
APicture.Visible = True 这个变量在那,不全发上来,人家怎么给你看啊??
代码有误
If Picture1.Visible = "True" Then
APicture.Picture = LoadPicture(App.Path + "\文字图片\狮.jpg")
应改成这样
If Picture1.Visible = True Then
APicture.Picture = LoadPicture(App.Path & "\文字图片\狮.jpg")
你想要怎样的效果?不说明,人家怎么帮你看?
(你的代码应该能运行,但不是你要的效果。你想要什么效果?)