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

📄 form1.frm

📁 vb电子书籍
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H00E0E0E0&
   ClientHeight    =   2940
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5895
   FillColor       =   &H00C0C0C0&
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   12
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   2940
   ScaleWidth      =   5895
   StartUpPosition =   2  '屏幕中心
   Begin VB.PictureBox Picture3 
      Height          =   855
      Left            =   1680
      ScaleHeight     =   795
      ScaleWidth      =   3675
      TabIndex        =   6
      Top             =   1560
      Width           =   3735
   End
   Begin VB.PictureBox Picture2 
      Height          =   375
      Left            =   1680
      ScaleHeight     =   315
      ScaleWidth      =   3675
      TabIndex        =   5
      Top             =   960
      Width           =   3735
   End
   Begin VB.PictureBox Picture1 
      Height          =   375
      Left            =   1680
      ScaleHeight     =   315
      ScaleWidth      =   3675
      TabIndex        =   4
      Top             =   360
      Width           =   3735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "合并(先点击FROM框)"
      Height          =   375
      Left            =   120
      TabIndex        =   3
      Top             =   2520
      Width           =   2895
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "合并后C"
      Height          =   240
      Left            =   600
      TabIndex        =   2
      Top             =   1560
      Width           =   840
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "数B:"
      Height          =   240
      Left            =   960
      TabIndex        =   1
      Top             =   960
      Width           =   600
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "数组A:"
      Height          =   240
      Left            =   720
      TabIndex        =   0
      Top             =   360
      Width           =   840
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'CODE Manger By BcodeXRose
Dim A1(), B1(), C1()

'##################################################################
'## 过程名称:Command1_Click
'## 参数: 无
'##################################################################
Private Sub Command1_Click()

    Call merage(A1(), B1(), C1())
    For i = 0 To UBound(C1)
        Picture3.Print C1(i);
        If (i + 1) Mod 10 = 0 Then
          Picture3.Print vbCrLf
        End If
    Next i
End Sub
    
'##################################################################
'## 过程名称:Form_Click
'## 参数: 无
'##################################################################
Private Sub Form_Click()
    Dim i As Integer
    A1 = Array(2, 4, 6, 8, 10)
    B1 = Array(1, 3, 5, 7, 9, 11, 13, 15)
    For i = 0 To UBound(A1)
        Picture1.Print A1(i);
    Next i
    For i = 0 To UBound(B1)
        Picture2.Print B1(i);
    Next i
    ReDim C1(UBound(A1) + UBound(B1) + 1)
End Sub
'##################################################################
'## 过程名称:merage
'## 参数:a()  类型不确定
'## 参数:b()  类型不确定
'## 参数:c()  类型不确定
'##################################################################
Sub merage(a(), b(), c())
    Dim ia As Integer, ib As Integer, ic As Integer
    Dim i As Integer
    Do While ia <= UBound(a) And ib <= UBound(b)
        If a(ia) < b(ib) Then
            c(ic) = a(ia): ia = ia + 1
        Else
            c(ic) = b(ib): ib = ib + 1
        End If
        ic = ic + 1
    Loop
    Do While ia <= UBound(a)
        c(ic) = b(ib): ib = ib + 1
    Loop
End Sub

⌨️ 快捷键说明

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