题库 题库

【简答题】

参考答案

Private Sub Form_Click()
    If Op1 Then
        Lab1.Caption = Text1.Text
        Text1.Text = Text2.Text
        Text2.Text = Lab1.Caption
        Lab1.Caption = "交换成功"
    ElseIf Op2 Then
        Lab1.Caption = Text1.Text & Text2.Text
    End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
    Open "out4.txt" For Output As #1
    Print #1, Op1.Value, Op2.Value, Text1.Text, Text2.Text, Lab1.Caption
    Close #1
End Sub

相关试题