📄 code2html.frm
字号:
VERSION 5.00
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "SHDOCVW.DLL"
Begin VB.Form fCode2html
Caption = "Form1"
ClientHeight = 5010
ClientLeft = 60
ClientTop = 345
ClientWidth = 9465
LinkTopic = "Form1"
ScaleHeight = 5010
ScaleWidth = 9465
StartUpPosition = 3 'Windows Default
Begin VB.Frame Frame1
Height = 675
Left = 75
TabIndex = 1
Top = 4230
Width = 9360
Begin VB.OptionButton Option1
Caption = "View"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Index = 2
Left = 5865
TabIndex = 5
Top = 210
Value = -1 'True
Width = 945
End
Begin VB.CommandButton Command1
Caption = "Process Clipboard"
Height = 405
Left = 7350
TabIndex = 4
Top = 180
Width = 1935
End
Begin VB.OptionButton Option1
Caption = "Copy"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Index = 1
Left = 3780
TabIndex = 3
Top = 210
Width = 1005
End
Begin VB.OptionButton Option1
Caption = "Shell"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Index = 0
Left = 1710
TabIndex = 2
Top = 240
Width = 960
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Action:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000080&
Height = 300
Index = 1
Left = 150
TabIndex = 8
Top = 240
Width = 855
End
End
Begin SHDocVwCtl.WebBrowser Web
Height = 3705
Left = 105
TabIndex = 0
Top = 60
Width = 9285
ExtentX = 16378
ExtentY = 6535
ViewMode = 0
Offline = 0
Silent = 0
RegisterAsBrowser= 0
RegisterAsDropTarget= 1
AutoArrange = 0 'False
NoClientEdge = 0 'False
AlignLeft = 0 'False
ViewID = "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
Location = ""
End
Begin VB.Label Label2
Caption = "Instructions :"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000080&
Height = 345
Left = 60
TabIndex = 7
Top = 3870
Width = 1620
End
Begin VB.Label Label1
Caption = "Copy Vb Source Text to Convert then Hit Process Clipboard"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Index = 0
Left = 1785
TabIndex = 6
Top = 3900
Width = 7635
End
End
Attribute VB_Name = "fCode2html"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
fileloc = App.path & "\tmp.html"
Formatted = formatIt(Clipboard.GetText)
WriteFile fileloc, Formatted
Web.Navigate "file://" & fileloc
If Option1(0).Value Then
Shell "notepad " & fileloc, vbNormalFocus
ElseIf Option1(1).Value Then
Clipboard.Clear
Clipboard.SetText Formatted
End If
End Sub
Private Sub Form_Load()
Web.Navigate "about:blank"
Call initalizeRW
End Sub
Sub WriteFile(path, it)
f = FreeFile
Open path For Output As #f
Print #f, it
Close f
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -