Private Sub Command2_Click()
If Me.Command2.Caption <> "取消" And Not (IsNull(Me.Text0)) Then
Me.Form.Caption = Me.Text0
Me.Label1.Caption = "名称"
Me.Command2.Caption = "取消"
Else
Me.Form.Caption = "窗体2:窗体"
Me.Label1.Caption = "Text0:"
Me.Text0 = "请输入窗体名称"
Me.Command2.Caption = "换名"
End If
End Sub