4.20.frm

来自「VB6.0应用例题」· FRM 代码 · 共 42 行

FRM
42
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "过程调用"
   ClientHeight    =   2475
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   2475
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   375
      Left            =   2160
      TabIndex        =   0
      Top             =   1440
      Width           =   1215
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
  Dim X%, Y%
  X = InputBox("请输入数据")
  Y = InputBox("请输入数据")
  Call Add(X, Y)          '调用求和通用过程
  Subst X, Y              '调用求差通用过程
End Sub
Sub Add(A, B)
  Dim C%
  C = A + B: Print C
End Sub
Sub Subst(A, B)
  Dim C%
  C = A - B: Print C
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?