?? frmopenwww.frm
字號:
VERSION 5.00
Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "MSINET.OCX"
Begin VB.Form frmOpenWWW
BorderStyle = 4 'Fixed ToolWindow
Caption = "Open from the Web ..."
ClientHeight = 1950
ClientLeft = 45
ClientTop = 285
ClientWidth = 7410
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1950
ScaleWidth = 7410
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin InetCtlsObjects.Inet Inet1
Left = 6600
Top = 240
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
End
Begin VB.CommandButton cmdCancel
Caption = "Cancel"
Height = 375
Left = 5640
TabIndex = 5
Top = 1440
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "OK"
Height = 375
Left = 3840
TabIndex = 4
Top = 1440
Width = 1575
End
Begin VB.PictureBox Picture1
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 480
Left = 240
Picture = "frmOpenWWW.frx":0000
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 3
Top = 120
Width = 480
End
Begin VB.Frame Frame1
Height = 1095
Left = 120
TabIndex = 0
Top = 240
Width = 7095
Begin VB.TextBox txtURL
Height = 285
Left = 1200
TabIndex = 1
Top = 465
Width = 5415
End
Begin VB.Label Label1
Caption = "URL:"
Height = 255
Left = 480
TabIndex = 2
Top = 480
Width = 495
End
End
End
Attribute VB_Name = "frmOpenWWW"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'########################################################################### '
'
' Casper HTML Editor,
' I have developed this just for fun and I of course used some
' of the codes out there. As far as I know you may use the code
' under GPL (General Public Licence), what you do with my code,
' the one I wrote is up to you. Funny think is you'll never know what
' is mine own code -:)
'
' Well anyway, I appreciate your time and if you have any suggestion on
' how to improve the editor, please contact me at : Vpekulas@Home.com
'
' Why Casper ? Casper Semiramis III was my dog (boxer).
'
' PS:
' I'll work on it some more, specialy on Syntax coloring (It's so damn slow!)
' and then on the snippets & Java library.
'
'########################################################################### '
Private Sub cmdCancel_Click()
Unload frmOpenWWW
End Sub
Private Sub Command1_Click()
If txtURL.Text = "" Then
MsgBox " Please Enter URL ! "
Exit Sub
End If
Dim b() As Byte
'set protocol to HTTP
Inet1.Protocol = icHTTP
'set URL
Inet1.URL = txtURL.Text
' Retrieve the HTML data into a byte array.
b() = Inet1.OpenURL(Inet1.URL, icByteArray)
' Create a local file from the retrieved data.
Open "c:\Casper~www~open.html" For Binary Access Write As #1
Put #1, , b()
Close #1
Unload frmOpenWWW
'Open in Editor
'Call ReadTheFile
'On Error Resume Next
Dim intFileNum As Integer
Dim strTextLine As String, strFilename As String
Dim CI As Integer
intFileNum = FreeFile
Open "c:\Casper~www~open.html" For Input As #intFileNum
frmDocument.rtfText.Text = ""
frmDocument.rtfText.Visible = False
frmDocument.PrgBar.Visible = True
CI = 0
Do While Not EOF(intFileNum)
CI = CI + 1
Line Input #intFileNum, strTextLine
frmDocument.rtfText.Text = frmDocument.rtfText.Text & strTextLine & vbCrLf
frmDocument.PrgBar.Value = CI
Loop
Close #intFileNum
' Set the colors:
m_TextCol = vbBlack
m_AttribCol = 8388736
m_TagCol = 10485760
m_CommentCol = 8421440
m_AspCol = 128
'HTMLTemplate
HtmlHighlight
frmDocument.rtfText.Visible = True
frmDocument.PrgBar.Visible = False
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -