?? form1.frm
字號:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "第2種執行帶參數函數的方法"
Height = 375
Left = 600
TabIndex = 2
Top = 1680
Width = 2655
End
Begin VB.CommandButton Command1
Caption = "第1種執行帶參數函數的方法"
Height = 375
Left = 600
TabIndex = 1
Top = 960
Width = 2655
End
Begin VB.TextBox Text1
Height = 375
Left = 600
TabIndex = 0
Top = 240
Width = 2655
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'單擊命令按鈕command1后的執行代碼
Private Sub Command1_Click()
Dim total As Integer
Dim i As Integer
total = 5
i = 1
'調用帶參數函數
argumentfunction total, i
End Sub
'單擊命令按鈕command2后的執行代碼
Private Sub Command2_Click()
Dim total As Integer
Dim i As Integer
total = 6
i = 2
'調用帶參數函數
Call argumentfunction(total, i)
End Sub
'定義帶參數函數
Function argumentfunction(argumenttotal As Integer, argumenti As Integer)
While argumenti <= argumenttotal
argumenti = argumenti + 1
Wend
Text1.Text = argumenttotal
End Function
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -