📄 frmwanderer.frm
字号:
VERSION 5.00
Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "MSINET.OCX"
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form frmWanderer
Caption = "搜 索"
ClientHeight = 6090
ClientLeft = 60
ClientTop = 345
ClientWidth = 8235
LinkTopic = "Form1"
ScaleHeight = 6090
ScaleWidth = 8235
StartUpPosition = 2 'CenterScreen
Begin RichTextLib.RichTextBox RichTextSearch
Height = 2775
Left = 120
TabIndex = 8
Top = 3000
Width = 7935
_ExtentX = 13996
_ExtentY = 4895
_Version = 393217
TextRTF = $"frmWanderer.frx":0000
End
Begin VB.TextBox Text1
Height = 495
Left = 1440
TabIndex = 6
Top = 120
Width = 2775
End
Begin RichTextLib.RichTextBox rtbLinkNames
Height = 1215
Left = 120
TabIndex = 5
Top = 1320
Width = 8175
_ExtentX = 14420
_ExtentY = 2143
_Version = 393217
TextRTF = $"frmWanderer.frx":028A
End
Begin VB.CommandButton cmdStopWandering
Caption = "停止"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4320
TabIndex = 4
Top = 720
Width = 1335
End
Begin VB.CommandButton cmdExit
Caption = "退出"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 6120
TabIndex = 3
Top = 720
Width = 1215
End
Begin VB.CommandButton cmdGoWander
Caption = "搜索"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4320
TabIndex = 2
Top = 120
Width = 1335
End
Begin VB.TextBox txtSite
Height = 495
Left = 1440
TabIndex = 1
Top = 720
Width = 2775
End
Begin InetCtlsObjects.Inet itcWander
Left = 120
Top = 1320
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
End
Begin VB.Label Label3
Caption = "包含有关键字的网页:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 9
Top = 2640
Width = 3255
End
Begin VB.Label Label2
Caption = "关键字:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 7
Top = 240
Width = 975
End
Begin VB.Label Label1
Caption = "开始 URL"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 0
Top = 840
Width = 1095
End
End
Attribute VB_Name = "frmWanderer"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdGoWander_Click()
stopSearching = False
rtbLinkNames.Text = ""
Current_pos = 1
Me.MousePointer = vbArrowHourglass
cmdGoWander.Enabled = True
cmdStopWandering.Enabled = True
If Get_File(txtSite.Text) Then
If Not parse Then
Me.MousePointer = vbNormal
cmdGoWander.Enabled = True
cmdStopWandering.Enabled = False
Exit Sub
End If
Else
Me.MousePointer = vbNormal
MsgBox "unable to find the desired site."
End If
cmdGoWander.Enabled = True
cmdStopWandering.Enabled = False
Me.MousePointer = vbNormal
stopSearching = True
End Sub
Private Sub cmdStopWandering_Click()
stopSearching = True
End Sub
Private Sub Form_Load()
txtSite.Text = "http://www.21cn.com"
NewLine = Chr(13) & Chr(10)
stopSearching = True
cmdStopWandering.Enabled = False
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Dim ResPonse As Integer
If Not stopSearching Then
ResPonse = MsgBox("stop search and lose updated file?", vbYesNo)
If ResPonse = vbNo Then
Cancel = 1
Exit Sub
End If
Else
respose = MsgBox("close program?", vbYesNo)
If ResPonse = vbNo Then
Cancel = 1
Exit Sub
End If
End If
itcWander.Cancel
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload frmSearching
Unload frmparsing
End Sub
Private Sub itcWander_StateChanged(ByVal State As Integer)
Dim strmess As String
DoEvents
Select Case State
Case ichostresolvinghost
connected = False
Case icConnected
connected = True
Case State = icError
strmess = "errorcode:" & itcWander.ResponseCode & ":" & itcsearch.ResponseInfo
MsgBox strmess, vbOKOnly
itcwandersearcherror = True
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -