VB编程题 在窗体花两个命令按钮,标题分别设置为“隐藏文本框”和“显示文本框”,当单击第一个命令按钮时

2024-12-25 13:27:54
推荐回答(2个)
回答1:

创建标准exe 粘贴下面代码就可以了
Private Sub Command1_Click()
Text1.Visible = True
End Sub

Private Sub Command2_Click()
Text1.Visible = False
End Sub

Private Sub Form_Load()
Command1.Caption = "显示文本框"
Command2.Caption = "隐藏文本框"
End Sub

回答2:

Private Sub Command1_Click()
Text1.Visible = False '隐藏文本框
End Sub

Private Sub Command2_Click()
Text1.Text = "vB程序设计" '设置文本框内容
Text1.Visible = True '显示文本框
End Sub