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

📄 wince注册表比较.frm

📁 WinCE注册表比较:最初用于两个WinCE注册表的对比。其实可用于任何由regedit.exe导出的reg文件的比较。
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form Form1 
   Caption         =   "WinCE注册表比较"
   ClientHeight    =   5490
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   8460
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   ScaleHeight     =   5490
   ScaleWidth      =   8460
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command4 
      Caption         =   "项比较"
      Height          =   315
      Left            =   7230
      TabIndex        =   4
      Top             =   480
      Width           =   1155
   End
   Begin VB.TextBox Text1 
      Appearance      =   0  'Flat
      Height          =   4545
      Left            =   120
      MultiLine       =   -1  'True
      ScrollBars      =   3  'Both
      TabIndex        =   3
      Top             =   870
      Width           =   8265
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   3570
      Top             =   1920
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      Filter          =   "*.reg|*.reg"
   End
   Begin VB.CommandButton Command3 
      Caption         =   "目标文件"
      Height          =   315
      Left            =   120
      TabIndex        =   2
      Top             =   480
      Width           =   7035
   End
   Begin VB.CommandButton Command2 
      Caption         =   "参照文件"
      Height          =   315
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   7035
   End
   Begin VB.CommandButton Command1 
      Caption         =   "值比较"
      Height          =   315
      Left            =   7230
      TabIndex        =   0
      Top             =   120
      Width           =   1155
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



Dim file1 As String, file2 As String






Private Sub Command1_Click()
Dim Str1 As String, Str2 As String, Flag As String
MsgBox "查找目标文件与参照文件不同的值,请先将参照文件导入目标再比较!"
'查找目标文件与参照文件不同的值
Text1.Text = "目标文件与原文件不同的值:" & Chr(13) & Chr(10)

Open file1 For Input As #1
Do While Not EOF(1)
Input #1, Str1
    If Left(Str1, 1) = "[" Then
    Flag = Str1
    Text1.Text = Text1.Text & Chr(13) & Chr(10) & Str1
    
    Open file2 For Input As #2
    Do While Not EOF(2)
         Input #2, Str2
         If Str2 = Flag Then
         
             Do While Not Str2 = ""
             DoEvents
             If Str2 = Str1 Then Exit Do
             Loop
             If Str2 <> Str1 Then Text1.Text = Text1.Text & Chr(13) & Chr(10) & Str2
         End If
    Loop
    Close #2
    End If
Loop
Close

End Sub

Private Sub Command2_Click()
CommonDialog1.ShowOpen
file1 = CommonDialog1.FileName
End Sub

Private Sub Command3_Click()
CommonDialog1.ShowOpen
file2 = CommonDialog1.FileName
End Sub

Private Sub Command4_Click()
Dim Str1 As String, Str2 As String



'查找目标文件有而原文件没有的项
Text1.Text = "目标文件有而原文件没有的项:" & Chr(13) & Chr(10)
Open file2 For Input As #2
Do While Not EOF(2)
Input #2, Str2
 If Left(Str2, 1) = "[" Then
     Open file1 For Input As #1
       Do While Not EOF(1)
       DoEvents
           Input #1, Str1
           If Str2 = Str1 Then Exit Do
       Loop
       If EOF(1) Then
           Text1.Text = Text1.Text & Chr(13) & Chr(10) & Str2
           Text1.SelStart = Len(Text1.Text)
       End If
      
       Close #1

 End If
Loop

Close

MsgBox "Done", vbOKOnly, "查找目标文件有而原文件没有的项"






















End Sub

⌨️ 快捷键说明

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