?? exer21.frm
字號:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Click()
Dim a As Integer, b As Integer, intTemp As Integer '聲明變量
a = InputBox("輸入a變量的值", "inputA")
b = InputBox("輸入b變量的值", "inputB")
answer = MsgBox("是否交換a變量和b變量的值?", vbYesNo, "交換")
If answer = vbYes Then
intTemp = a: a = b: b = intTemp
End If
Print: Print "a="; a, "b="; b
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -