frmmerge.frm

来自「地面测试仪」· FRM 代码 · 共 152 行

FRM
152
字号
VERSION 5.00
Begin VB.Form FrmMerge 
   Caption         =   "文件合并"
   ClientHeight    =   2235
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5205
   Icon            =   "FrmMerge.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   2235
   ScaleWidth      =   5205
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command2 
      Caption         =   "返  回"
      Height          =   375
      Index           =   1
      Left            =   3840
      TabIndex        =   11
      Top             =   1800
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "开  始"
      Height          =   375
      Index           =   0
      Left            =   2580
      TabIndex        =   10
      Top             =   1800
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Height          =   1635
      Left            =   60
      TabIndex        =   0
      Top             =   0
      Width           =   5115
      Begin VB.CommandButton Command1 
         Caption         =   "..."
         Height          =   255
         Index           =   2
         Left            =   4440
         TabIndex        =   9
         Top             =   1200
         Width           =   495
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   2
         Left            =   1020
         TabIndex        =   8
         Top             =   1185
         Width           =   3435
      End
      Begin VB.CommandButton Command1 
         Caption         =   "..."
         Height          =   255
         Index           =   1
         Left            =   4440
         TabIndex        =   6
         Top             =   780
         Width           =   495
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   1
         Left            =   1020
         TabIndex        =   5
         Top             =   765
         Width           =   3435
      End
      Begin VB.CommandButton Command1 
         Caption         =   "..."
         Height          =   255
         Index           =   0
         Left            =   4440
         TabIndex        =   3
         Top             =   300
         Width           =   495
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   0
         Left            =   1020
         TabIndex        =   2
         Top             =   285
         Width           =   3435
      End
      Begin VB.Label Label1 
         Caption         =   "目标文件:"
         Height          =   255
         Index           =   2
         Left            =   180
         TabIndex        =   7
         Top             =   1200
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "源文件2:"
         Height          =   255
         Index           =   1
         Left            =   180
         TabIndex        =   4
         Top             =   780
         Width           =   915
      End
      Begin VB.Label Label1 
         Caption         =   "源文件1:"
         Height          =   255
         Index           =   0
         Left            =   180
         TabIndex        =   1
         Top             =   300
         Width           =   1035
      End
   End
End
Attribute VB_Name = "FrmMerge"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click(Index As Integer)
    
    mDialog.Filter = "文件 (*.dmy)|*.dmy"
    mDialog.Flags = cdlOFNFileMustExist
    mDialog.fileName = ""
    mDialog.DefaultExt = "dmy"
    mDialog.InitDir = App.Path 'getdefaultpath_load
    If Index = 2 Then
        mDialog.DialogTitle = "数据文件保存"
        mDialog.ShowSave
    Else
        mDialog.DialogTitle = "打开数据文件" & Index + 1
        mDialog.ShowOpen
    End If
    Text1(Index).Text = Trim(mDialog.fileName)
End Sub

Private Sub Command2_Click(Index As Integer)
Select Case Index
Case 0
    If Text1(0).Text = "" Or Text1(1).Text = "" Or Text1(2).Text = "" Then
    Else
        MergeData Text1(0).Text, Text1(1).Text, Text1(2).Text
    End If
Case 1
    Unload Me
End Select
End Sub

⌨️ 快捷键说明

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