📄 frmcodeeditor.frm
字号:
VERSION 5.00
Object = "{ECEDB943-AC41-11D2-AB20-000000000000}#2.0#0"; "cmax20.ocx"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{38911DA0-E448-11D0-84A3-00DD01104159}#1.1#0"; "COMCT332.OCX"
Object = "{A79C0290-7F2E-412E-A0B8-2A355548F6DE}#1.0#0"; "prjChameleon.ocx"
Begin VB.Form frmCodeEditor
ClientHeight = 4875
ClientLeft = 165
ClientTop = 735
ClientWidth = 6465
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmCodeEditor.frx":0000
LinkTopic = "Form1"
ScaleHeight = 4875
ScaleWidth = 6465
StartUpPosition = 3 '窗口缺省
WindowState = 2 'Maximized
Begin MSComctlLib.ImageList IMLtbrGeneral
Left = 2280
Top = 3000
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 12
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCodeEditor.frx":27A2
Key = "copy"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCodeEditor.frx":2E74
Key = "cut"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCodeEditor.frx":2FCE
Key = "find next"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCodeEditor.frx":3128
Key = "find"
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCodeEditor.frx":3282
Key = "goto line number"
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCodeEditor.frx":33DC
Key = "indent"
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCodeEditor.frx":3536
Key = "mark all found"
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCodeEditor.frx":3690
Key = "outdent"
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCodeEditor.frx":37EA
Key = "paste"
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCodeEditor.frx":3EBC
Key = "redo"
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCodeEditor.frx":4016
Key = "replace"
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmCodeEditor.frx":46E8
Key = "undo"
EndProperty
EndProperty
End
Begin VB.PictureBox picTop
Align = 1 'Align Top
BorderStyle = 0 'None
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 136
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1095
Left = 0
ScaleHeight = 1095
ScaleWidth = 6465
TabIndex = 4
Top = 0
Width = 6465
Begin TabDlg.SSTab tabCode
Height = 615
Left = 3600
TabIndex = 6
Top = 120
Width = 6255
_ExtentX = 11033
_ExtentY = 1085
_Version = 393216
Style = 1
Tabs = 9
TabsPerRow = 9
TabHeight = 520
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
TabCaption(0) = "Standard"
TabPicture(0) = "frmCodeEditor.frx":4842
Tab(0).ControlEnabled= -1 'True
Tab(0).ControlCount= 0
TabCaption(1) = "Forms"
TabPicture(1) = "frmCodeEditor.frx":485E
Tab(1).ControlEnabled= 0 'False
Tab(1).ControlCount= 0
TabCaption(2) = "Fonts"
TabPicture(2) = "frmCodeEditor.frx":487A
Tab(2).ControlEnabled= 0 'False
Tab(2).ControlCount= 0
TabCaption(3) = "Lists"
TabPicture(3) = "frmCodeEditor.frx":4896
Tab(3).ControlEnabled= 0 'False
Tab(3).ControlCount= 0
TabCaption(4) = "Scripts"
TabPicture(4) = "frmCodeEditor.frx":48B2
Tab(4).ControlEnabled= 0 'False
Tab(4).ControlCount= 0
TabCaption(5) = "Frames"
TabPicture(5) = "frmCodeEditor.frx":48CE
Tab(5).ControlEnabled= 0 'False
Tab(5).ControlCount= 0
TabCaption(6) = "Advance"
TabPicture(6) = "frmCodeEditor.frx":48EA
Tab(6).ControlEnabled= 0 'False
Tab(6).ControlCount= 0
TabCaption(7) = "ASP"
TabPicture(7) = "frmCodeEditor.frx":4906
Tab(7).ControlEnabled= 0 'False
Tab(7).ControlCount= 0
TabCaption(8) = "SSI"
TabPicture(8) = "frmCodeEditor.frx":4922
Tab(8).ControlEnabled= 0 'False
Tab(8).ControlCount= 0
End
Begin ComCtl3.CoolBar CoolBar
Height = 840
Left = 120
TabIndex = 5
Top = 0
Width = 3375
_ExtentX = 5953
_ExtentY = 1482
_CBWidth = 3375
_CBHeight = 840
_Version = "6.7.9782"
Child1 = "tbrGeneral"
MinHeight1 = 390
Width1 = 1575
NewRow1 = 0 'False
MinHeight2 = 360
Width2 = 1440
NewRow2 = -1 'True
Child3 = "cmdApply"
MinHeight3 = 255
Width3 = 765
NewRow3 = 0 'False
Begin MSComctlLib.Toolbar tbrGeneral
Height = 390
Left = 165
TabIndex = 8
Top = 30
Width = 3120
_ExtentX = 5503
_ExtentY = 688
ButtonWidth = 609
ButtonHeight = 582
Wrappable = 0 'False
_Version = 393216
End
Begin prjChameleon.chameleonButton cmdApply
Default = -1 'True
Height = 255
Left = 1635
TabIndex = 7
Top = 495
Width = 1650
_ExtentX = 2910
_ExtentY = 450
BTYPE = 3
TX = "Apply to Document"
ENAB = -1 'True
BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
COLTYPE = 3
FOCUSR = -1 'True
BCOL = 16777215
FCOL = 0
End
End
End
Begin VB.PictureBox picMain
Align = 4 'Align Right
BorderStyle = 0 'None
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 136
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3405
Left = -1560
ScaleHeight = 3405
ScaleWidth = 8025
TabIndex = 2
Top = 1095
Width = 8025
Begin CodeMaxCtl.CodeMax Code
Height = 2655
Left = 120
OleObjectBlob = "frmCodeEditor.frx":493E
TabIndex = 3
Top = 360
Width = 2535
End
End
Begin VB.PictureBox picTools
Align = 3 'Align Left
BorderStyle = 0 'None
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 136
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3405
Left = 0
ScaleHeight = 3405
ScaleWidth = 1815
TabIndex = 1
Top = 1095
Width = 1815
End
Begin MSComctlLib.StatusBar staMain
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 0
Top = 4500
Width = 6465
_ExtentX = 11404
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 1
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
EndProperty
EndProperty
End
Begin VB.Menu mnuHelp
Caption = "Help (&H)"
Begin VB.Menu mnuHelp_Content
Caption = "Content..."
End
Begin VB.Menu mnuHelp_Reference
Caption = "Reference..."
End
Begin VB.Menu mnuHelp_1
Caption = "-"
End
Begin VB.Menu mnuHelp_About
Caption = "About Page Creator 3"
End
End
End
Attribute VB_Name = "frmCodeEditor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public R As CodeMaxCtl.Range
Public Job As String
Public HTMLString As String
Private Sub cmdApply_Click()
DoEvents
Dim n As Integer
n = ApplyCode
If n <> 0 Then
MsgBox Error(n), vbCritical, "Error Number: " & n
End If
End Sub
Public Function ApplyCode() As Integer
SaveText CStatus(CInt(Me.Tag)).TempFilename, Code.Text
On Error GoTo 1
Creator(CInt(Me.Tag)).DHTML1.LoadDocument CStatus(CInt(Me.Tag)).TempFilename
Me.HTMLString = Code.Text
ApplyCode = 0
Exit Function
1
ApplyCode = Err.Number
End Function
Private Sub Code_SelChange(ByVal Control As CodeMaxCtl.ICodeMax)
Set R = Code.GetSel(True)
Code.HighlightedLine = R.EndLineNo
If Code.SelText <> "" Then Exit Sub
If R.EndColNo > Code.GetLineLength(R.EndLineNo) Then
Code.SetCaretPos R.EndLineNo, Code.GetLineLength(R.EndLineNo)
End If
End Sub
Private Sub Form_Activate()
ToolBoxTab False, frmToolBox.SSTab1
End Sub
Private Sub Form_Load()
With Code
.SetColor cmClrLeftMargin, &H808080
.SetColor cmClrLineNumberBk, &H808080
.SetColor cmClrLineNumber, vbWhite
.HighlightedLine = 0
End With
End Sub
Private Sub Form_Resize()
On Error Resume Next
picMain.Width = Me.ScaleWidth - picTools.Width
End Sub
Private Sub Form_Unload(Cancel As Integer)
If Me.Job = "kill" Then GoTo UnloadCode
Dim n As Integer
If Trim(LCase(Me.HTMLString)) <> Trim(LCase(Code.Text)) Then
m = MsgBox("Do you want to apply the changes on this Document?", vbYesNoCancel + vbQuestion)
Select Case m
Case vbCancel
Cancel = 1
Exit Sub
Case vbYes
n = ApplyCode
If n <> 0 Then
MsgBox Error(n)
Cancel = 1
Exit Sub
End If
GoTo HideCode
Case vbNo
GoTo HideCode
End Select
End If
HideCode:
CStatus(CInt(Me.Tag)).HTMLOpened = False
Me.Hide
Cancel = 1
Exit Sub
UnloadCode:
CStatus(CInt(Me.Tag)).HTMLOpened = False
End Sub
Private Sub mnuHelp_About_Click()
frmAbout.Show vbModal
End Sub
Private Sub picMain_Resize()
Code.Move 0, 0, picMain.Width, picMain.Height
End Sub
Private Sub picTop_Resize()
On Error Resume Next
CoolBar.Move 0, 0
picTop.Height = CoolBar.Height
tabCode.Move CoolBar.Width, 0, picTop.Width - CoolBar.Width, picTop.Height
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -