这个VB程序代码怎么写啊?

来源:百度知道 编辑:UC知道 时间:2024/05/21 16:14:45
当单击一个命令按钮时,文本框消失;单击另一个时,文本框重新出现,并在文本框中显示“VB程序设计”(字体大小为16)

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

Private Sub Command2_Click()
Text1.Visible = True
Text1.Text = "VB程序设计"
Text1.FontSize = 16
End Sub

Dim flag As Boolean
Private Sub Command1_Click()
If flag = False Then
Text1.Font = 16
Text1.Text = "VB程序设计"
flag = True
End If
End Sub

Private Sub Command2_Click()
If flag = True Then
Text1.Text = ""
flag = False
End If
End Sub