两个文本框初始值为空,且“复制”“清除”,两个命令按钮为”不可见“。
Private Sub Command1_Click()Text2.Text = Text1.Text
End Sub
Private Sub Command2_Click()Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub Form_Load()Text1.Text = ""
Text2.Text = ""
Command1.Visible = False
Command2.Visible = False
Command1.Caption = "复制"
Command2.Caption = "清除"
End Sub
Private Sub Text1_Change()If Text1.Text <> "" Then
Command1.Visible = True
Command2.Visible = True
Else
Command1.Visible = False
Command2.Visible = False
End If
End Sub