?? wince注冊表比較.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 = "項(xiàng)比較"
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 = "目標(biāo)文件"
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 "查找目標(biāo)文件與參照文件不同的值,請先將參照文件導(dǎo)入目標(biāo)再比較!"
'查找目標(biāo)文件與參照文件不同的值
Text1.Text = "目標(biāo)文件與原文件不同的值:" & 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
'查找目標(biāo)文件有而原文件沒有的項(xiàng)
Text1.Text = "目標(biāo)文件有而原文件沒有的項(xiàng):" & 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, "查找目標(biāo)文件有而原文件沒有的項(xiàng)"
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -