⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 传址传值.frm

📁 Visual Basic课程举例1 有很好的例题
💻 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  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "交换"
      Height          =   615
      Left            =   840
      TabIndex        =   0
      Top             =   1800
      Width           =   2535
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Public Sub Swap1(ByVal x As Integer, ByVal y As Integer)
    Dim t As Integer
    t = x
    x = y
    y = t
End Sub

Public Sub Swap2(x As Integer, y As Integer)
    Dim t As Integer
    t = x
    x = y
    y = t
End Sub

Private Sub Command1_Click()
    Dim a As Integer, b As Integer
    a = 10
    b = 20
    Print "交换前"
    Print "a="; a, "b="; b
    Swap1 a, b
    Print "用swap1交换后"
    Print "a="; a, "b="; b
    a = 10
    b = 20
     Print "交换前"
    Print "A="; a, "B="; b
    Swap2 a, b
     Print "用swap2交换后"
    Print "A="; a, "B="; b
    
    
End Sub

⌨️ 快捷键说明

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