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

📄 compare.frm

📁 不错的一个VB菜单设计 界面和功能都不错
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{8A1C4FDC-11A7-11D3-938B-0000832EF44D}#2.0#0"; "FASTWin.ocx"
Begin VB.Form frmCompare 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "File Compare"
   ClientHeight    =   2160
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5070
   Icon            =   "Compare.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2160
   ScaleWidth      =   5070
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdFile 
      Caption         =   "..."
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Index           =   1
      Left            =   3915
      TabIndex        =   4
      Top             =   765
      Width           =   375
   End
   Begin VB.TextBox txtFile 
      Height          =   375
      Index           =   1
      Left            =   495
      TabIndex        =   3
      Top             =   765
      Width           =   3390
   End
   Begin MSComDlg.CommonDialog dlgOpen 
      Left            =   4320
      Top             =   1530
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton cmdFile 
      Caption         =   "..."
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Index           =   0
      Left            =   3915
      TabIndex        =   2
      Top             =   315
      Width           =   375
   End
   Begin VB.CommandButton cmdCompare 
      Caption         =   "&Compare"
      Default         =   -1  'True
      Height          =   465
      Left            =   1665
      TabIndex        =   1
      Top             =   1485
      Width           =   1950
   End
   Begin VB.TextBox txtFile 
      Height          =   375
      Index           =   0
      Left            =   495
      TabIndex        =   0
      Top             =   315
      Width           =   3390
   End
   Begin FLWDiskFile.FWFileOperations objFileOperations 
      Left            =   360
      Top             =   1500
      _ExtentX        =   820
      _ExtentY        =   820
   End
End
Attribute VB_Name = "frmCompare"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCompare_Click()
  Select Case objFileOperations.FileCompare(txtFile(0), txtFile(1))
    Case 1
      Call MsgBox("The files are equal")
    Case 0
      Call MsgBox("The files are diferent")
    Case -1
      Call MsgBox("Error opening file1")
    Case -2
      Call MsgBox("Error opening file2")
    Case -3
      Call MsgBox("Error reading file1")
    Case -4
      Call MsgBox("Error reading file2")
  End Select
End Sub

Private Sub cmdFile_Click(Index As Integer)
  dlgOpen.FileName = txtFile(Index)
  Call dlgOpen.ShowOpen
  txtFile(Index) = dlgOpen.FileName
End Sub

⌨️ 快捷键说明

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