📄 frmmain.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmMain
Caption = "Registry Editor"
ClientHeight = 5760
ClientLeft = 165
ClientTop = 450
ClientWidth = 9465
Icon = "frmMain.frx":0000
LinkTopic = "Form1"
ScaleHeight = 384
ScaleMode = 3 'Pixel
ScaleWidth = 631
StartUpPosition = 2 'CenterScreen
Begin MSComDlg.CommonDialog cdImport
Left = 4800
Top = 120
_ExtentX = 847
_ExtentY = 847
_Version = 393216
DefaultExt = "reg"
DialogTitle = "Import from file..."
Filter = "Registration Files (*.reg)|*.reg|All Files (*.*)|*.*"
End
Begin VB.TextBox txtExport
Height = 525
Left = 4560
TabIndex = 5
Top = 120
Visible = 0 'False
Width = 150
End
Begin VB.TextBox txtOutput
Height = 315
Left = 3900
TabIndex = 4
Top = 900
Visible = 0 'False
Width = 615
End
Begin MSComctlLib.StatusBar stbStatus
Align = 2 'Align Bottom
Height = 315
Left = 0
TabIndex = 3
Top = 5445
Width = 9465
_ExtentX = 16695
_ExtentY = 556
Style = 1
SimpleText = "My Computer"
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 1
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
EndProperty
EndProperty
End
Begin VB.PictureBox picSplitter
Height = 1065
Left = 3600
ScaleHeight = 1005
ScaleWidth = 15
TabIndex = 2
Top = 150
Width = 75
End
Begin MSComctlLib.ImageList imlIcons
Left = 3900
Top = 150
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 5
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0E42
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":13DE
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":197A
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1AD6
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1C32
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.ListView lvwData
Height = 1065
Left = 1950
TabIndex = 1
Top = 150
Width = 1515
_ExtentX = 2672
_ExtentY = 1879
View = 3
LabelEdit = 1
Sorted = -1 'True
LabelWrap = -1 'True
HideSelection = -1 'True
FullRowSelect = -1 'True
_Version = 393217
SmallIcons = "imlIcons"
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 2
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "Name"
Object.Width = 3969
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "Value"
Object.Width = 6615
EndProperty
End
Begin MSComctlLib.TreeView tvwKeys
Height = 1065
Left = 0
TabIndex = 0
Top = 150
Width = 1815
_ExtentX = 3201
_ExtentY = 1879
_Version = 393217
LabelEdit = 1
Sorted = -1 'True
Style = 7
HotTracking = -1 'True
ImageList = "imlIcons"
Appearance = 1
End
Begin VB.Menu mnuMain
Caption = "&Registry"
Begin VB.Menu mnuImport
Caption = "&Import Registry File..."
End
Begin VB.Menu mnuExport
Caption = "&Export Registry File..."
End
Begin VB.Menu sep1
Caption = "-"
End
Begin VB.Menu mnuExit
Caption = "&Quit"
Shortcut = ^Q
End
End
Begin VB.Menu mnuEdit
Caption = "&Edit"
Begin VB.Menu mnuModify
Caption = "Modify"
End
Begin VB.Menu sep2
Caption = "-"
End
Begin VB.Menu mnuNew
Caption = "New"
Begin VB.Menu mnuNewKey
Caption = "&Key"
Enabled = 0 'False
End
Begin VB.Menu sep3
Caption = "-"
End
Begin VB.Menu mnuNewString
Caption = "&String Value"
End
Begin VB.Menu mnuNewBinary
Caption = "&Binary value"
Enabled = 0 'False
End
Begin VB.Menu mnuNewDWORD
Caption = "&DWORD"
Enabled = 0 'False
End
End
Begin VB.Menu sep4
Caption = "-"
End
Begin VB.Menu mnuKillKey
Caption = "&Delete Key"
Enabled = 0 'False
Shortcut = +{DEL}
End
Begin VB.Menu mnuKillValue
Caption = "Delete &Value"
Enabled = 0 'False
Shortcut = {DEL}
End
Begin VB.Menu sep5
Caption = "-"
End
Begin VB.Menu mnuCopyName
Caption = "&Copy Key Name"
Enabled = 0 'False
End
Begin VB.Menu sep6
Caption = "-"
End
Begin VB.Menu mnuFind
Caption = "&Find"
Shortcut = +{F3}
End
Begin VB.Menu mnuNext
Caption = "Find &Next"
Shortcut = {F3}
End
End
Begin VB.Menu mnuView
Caption = "&View"
Begin VB.Menu mnuStatus
Caption = "&Status bar"
Checked = -1 'True
End
Begin VB.Menu sep7
Caption = "-"
End
Begin VB.Menu mnuRefresh
Caption = "&Refresh"
Shortcut = {F5}
End
End
Begin VB.Menu mnuHelp
Caption = "&Help"
Begin VB.Menu mnuAbout
Caption = "&About"
Shortcut = {F1}
End
End
Begin VB.Menu popKey
Caption = "PopUpKey"
Visible = 0 'False
Begin VB.Menu pop1New
Caption = "New"
Begin VB.Menu popNewKey
Caption = "&Key"
End
Begin VB.Menu popSep1
Caption = "-"
End
Begin VB.Menu popNewString
Caption = "&String Value"
End
Begin VB.Menu popNewBinary
Caption = "&Binary Value"
End
Begin VB.Menu popNewDWORD
Caption = "&DWORD Value"
End
End
Begin VB.Menu popSep2
Caption = "-"
End
Begin VB.Menu popCopyPath
Caption = "&Copy Key Name"
End
Begin VB.Menu popKillKey
Caption = "&Delete Key"
End
Begin VB.Menu popExport
Caption = "&Export from this key"
End
End
Begin VB.Menu popData
Caption = "PopUpData"
Visible = 0 'False
Begin VB.Menu popModify
Caption = "&Modify"
End
Begin VB.Menu poopSep3
Caption = "-"
End
Begin VB.Menu pop2New
Caption = "New"
Begin VB.Menu pop2NewString
Caption = "&String Value"
End
Begin VB.Menu pop2NewBinary
Caption = "&Binary Value"
End
Begin VB.Menu pop2NewDWORD
Caption = "&DWORD Value"
End
End
Begin VB.Menu popSep4
Caption = "-"
End
Begin VB.Menu popKillValue
Caption = "&Delete"
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private WithEvents cSplit As clsSplitter 'splitter
Attribute cSplit.VB_VarHelpID = -1
Private Regy As clsRegistryAccess 'registry thing
'global node object
Private nodX As Node '(for adding nodes/keys)
Private lastNode As Node 'saves last selected node
'global listitem object
Private lstX As ListItem '(for adding values)
Private lastListItem As ListItem
'in this string will be saved names of all loaded keys (speeds up code very much)
Private opened As String
Private curSubkeys As String
Private curValues As String
Private nCount As Long
Private sCount As Long
Private bCount As Long
Private dCount As Long
Private Sub Form_Load()
On Error GoTo errTrap ' just in case ;)
Set Regy = New clsRegistryAccess 'init class module
'first to see if we got any command line arguments
If Len(Command) > 0 Then
Dim cmd As String, ret As Long, par() As String
cmd = Trim$(Command)
If Left$(LCase$(cmd), 2) = "/s" Then 'silent import mode
cmd = Mid$(cmd, 3, Len(cmd) - 2)
cmd = Replace(cmd, Chr$(34), vbNullString) 'strip quotes
ret = Regy.ImportFromReg(cmd)
ElseIf Left$(LCase$(cmd), 2) = "/e" Then 'export mode
cmd = Mid$(cmd, 3, Len(cmd) - 2)
If InStr(1, cmd, Chr$(34)) > 0 Then
par = Split(cmd, Chr$(34) & " " & Chr$(34))
ret = Regy.ExportToReg(Replace(par(0), Chr$(34), ""), _
Replace(par(1), Chr$(34), ""))
Else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -