2.3.frm
来自「VB6.0应用例题」· FRM 代码 · 共 47 行
FRM
47 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2160
ClientLeft = 60
ClientTop = 345
ClientWidth = 4260
LinkTopic = "Form1"
ScaleHeight = 2160
ScaleWidth = 4260
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "输出"
Height = 375
Left = 2400
TabIndex = 1
Top = 1200
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "变量交换"
Height = 375
Left = 600
TabIndex = 0
Top = 1200
Width = 1095
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private a As Integer, b As Integer '声明模块变量
Private Sub Command1_Click()
Dim intTemp As Integer '声明局部变量
a = 10: b = 20
Print "a变量和b变量内容交换前:"; a; b
'变量交换
intTemp = a: a = b: b = intTemp
End Sub
Private Sub Command2_Click()
Print "a变量和b变量内容交换后:"; a; b
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?