我学写了这些代码,写完后VB提示属性的使用无效
Private Sub Command1_Click()
Command1 Visible = False
Text1 Visible = False
Label1 Visible = False
Label2 Visible = True
Label2 Autosite = True
Label2 FontName = "黑体"
Label2 ForeCobor = vbRed
Label2 caption=Text1.Text&"同学, 祝你进步!"
Command2 Visible = True
Command3 Visible = True
End Sub
Private Sub Command2_Click()
Command2 Visible = False
Command3 Visible = False
Label1 Visible = True
Label2 Visible = False
Command1 Visible = True
Text1.Text = " "
Text1 Visible = True
End Sub
Private Sub Command3_Click()
End
End Sub
VB提示属性的使用无效
答案:4 悬赏:0 手机版
解决时间 2021-02-18 18:42
- 提问者网友:書生途
- 2021-02-18 15:25
最佳答案
- 五星知识达人网友:雾月
- 2021-02-18 16:37
Private Sub Command1_Click()
Command1.Visible = False
Text1.Visible = False
Label1.Visible = False
Label2.Visible = True
Label2.AutoSize = True
Label2.FontName = "ºÚÌå"
Label2.ForeColor = vbRed
Label2.Caption = Text1.Text & "同学, 祝你进步!"
Command2.Visible = True
Command3.Visible = True
End Sub
Private Sub Command2_Click()
Command2.Visible = False
Command3.Visible = False
Label1.Visible = True
Label2.Visible = False
Command1.Visible = True
Text1.Text = " "
Text1.Visible = True
End Sub
Private Sub Command3_Click()
End
End Sub
Command1.Visible = False
Text1.Visible = False
Label1.Visible = False
Label2.Visible = True
Label2.AutoSize = True
Label2.FontName = "ºÚÌå"
Label2.ForeColor = vbRed
Label2.Caption = Text1.Text & "同学, 祝你进步!"
Command2.Visible = True
Command3.Visible = True
End Sub
Private Sub Command2_Click()
Command2.Visible = False
Command3.Visible = False
Label1.Visible = True
Label2.Visible = False
Command1.Visible = True
Text1.Text = " "
Text1.Visible = True
End Sub
Private Sub Command3_Click()
End
End Sub
全部回答
- 1楼网友:酒醒三更
- 2021-02-18 19:21
你的程序没错,可能在使用分隔符时使用的汉字的标点符号不能通过;我把你的程序拷贝到vb中亦不能运行,我按照你的内容重新输入就通过了。下面是从我通过的vb中拷贝过来的你运行试试看:
private sub command1_click()
form1.circle (2400, 1000), 800
text1.text = "在窗体上画圆"
end sub
private sub command2_click()
form1.cls
text1.text = "圆消失了"
end sub
- 2楼网友:笑迎怀羞
- 2021-02-18 18:23
错误,很低级的错误
Private Sub Command1_Click()
Command1 Visible = False
Text1 Visible = False
Label1 Visible = False
Label2 Visible = True
Label2 Autosite = True
Label2 FontName = "黑体"
Label2 ForeCobor = vbRed
Label2 caption=Text1.Text&"同学, 祝你进步!"
Command2 Visible = True
Command3 Visible = True
End Sub
在你控件名后面多加个 “.” 不含双引号
如下:
Private Sub Command1_Click()
Command1.Visible = False
Text1.Visible = False
Label1.Visible = False
Label2.Visible = True
Label2.Autosite = True
Label2.FontName = "黑体"
Label2.ForeCobor = vbRed
Label2.caption=Text1.Text&"同学, 祝你进步!"
Command2.Visible = True
Command3.Visible = True
End Sub
后面的自己修改
会让你很惊喜的哦
- 3楼网友:掌灯师
- 2021-02-18 17:13
哥子你没加点,而且提一点习惯建议,command不要用visible=FALSE(true)
最好是enabled=FALSE(TRUE)
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯