📄 form1.frm
字号:
VERSION 5.00
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "shdocvw.dll"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Form1
Caption = "网络搜索器"
ClientHeight = 3975
ClientLeft = 60
ClientTop = 345
ClientWidth = 7185
LinkTopic = "Form1"
ScaleHeight = 3975
ScaleWidth = 7185
StartUpPosition = 3 '窗口缺省
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 13
Top = 3600
Width = 7185
_ExtentX = 12674
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
TextSave = "01-4-10"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
TextSave = "12:29"
EndProperty
EndProperty
End
Begin VB.CommandButton Command7
Caption = "下载中"
Height = 300
Left = 120
TabIndex = 12
Top = 120
Width = 855
End
Begin VB.CommandButton Command6
Caption = "关 于"
Height = 300
Left = 3600
TabIndex = 11
Top = 600
Width = 615
End
Begin VB.Frame Frame1
Caption = " 导航工具栏 "
Height = 855
Left = 4440
TabIndex = 6
Top = 0
Width = 2655
Begin VB.CommandButton Command5
Height = 495
Left = 1920
Picture = "Form1.frx":0000
Style = 1 'Graphical
TabIndex = 10
Top = 240
Width = 615
End
Begin VB.CommandButton Command4
Height = 495
Left = 1320
Picture = "Form1.frx":1622
Style = 1 'Graphical
TabIndex = 9
ToolTipText = "停止"
Top = 240
Width = 615
End
Begin VB.CommandButton Command3
Height = 495
Left = 720
Picture = "Form1.frx":2C44
Style = 1 'Graphical
TabIndex = 8
Top = 240
Width = 615
End
Begin VB.CommandButton Command2
Height = 495
Left = 120
Picture = "Form1.frx":424E
Style = 1 'Graphical
TabIndex = 7
Top = 240
UseMaskColor = -1 'True
Width = 615
End
End
Begin VB.CommandButton Command1
Caption = "搜 索"
Height = 300
Left = 3600
TabIndex = 5
Top = 120
Width = 615
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1800
TabIndex = 4
Text = "请选择搜索引擎"
Top = 555
Width = 1695
End
Begin VB.TextBox Text1
Height = 300
Left = 1200
TabIndex = 2
Top = 120
Width = 2295
End
Begin SHDocVwCtl.WebBrowser WebBrowser1
Height = 2535
Left = 120
TabIndex = 0
Top = 1080
Width = 6975
ExtentX = 12303
ExtentY = 4471
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 = "选择搜索引擎:"
Height = 255
Left = 120
TabIndex = 3
Top = 600
Width = 1335
End
Begin VB.Label Label1
Caption = "关键词:"
Height = 255
Left = 120
TabIndex = 1
Top = 120
Width = 735
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error Resume Next '出错后继续
If Combo1.Text = "请选择搜索引擎" Then MsgBox "请先选择搜索引擎!": Exit Sub
'防止没有选择搜索引擎
If Text1.Text = "" Then MsgBox "请先输入关键字": Exit Sub
'防止不输入关键词
Form1.Caption = "网络搜索器——搜索词: " & Text1.Text
If Combo1.Text = "孙悟空" Then
WebBrowser1.Navigate ("http://edu.search.chinaren.com/baidu?tn=chinaren&si=gi&ct=0&cl=2&word=" & Text1.Text & "&x=25&y=13")
End If
If Combo1.Text = "北大天网" Then
WebBrowser1.Navigate ("http://e.pku.edu.cn/cgi-bin/allsearch?word=" & Text1.Text & "&cdtype=GB&newquery=1")
End If
If Combo1.Text = "中文Yahoo" Then
WebBrowser1.Navigate ("http://cn.search.yahoo.com/search/gb?p=" & Text1.Text)
End If
If Combo1.Text = "Yahoo" Then
WebBrowser1.Navigate ("http://google.yahoo.com/bin/query?p=" & Text1.Text & "&hc=0&hs=0")
End If
End Sub
Private Sub Command2_Click()
On Error Resume Next
WebBrowser1.GoBack
End Sub
Private Sub Command3_Click()
On Error Resume Next
WebBrowser1.GoForward
End Sub
Private Sub Command4_Click()
WebBrowser1.Stop
End Sub
Private Sub Command5_Click()
WebBrowser1.Refresh
End Sub
Private Sub Command6_Click()
WebBrowser1.Navigate (App.Path & "\guanyu.txt")
End Sub
Private Sub Form_Load()
WebBrowser1.Navigate (App.Path & "\guanyu.txt")
Command7.Visible = False
StatusBar1.Panels(1).Text = " 等待"
Combo1.AddItem "孙悟空"
Combo1.AddItem "北大天网"
Combo1.AddItem "中文Yahoo"
Combo1.AddItem "————"
Combo1.AddItem "Yahoo"
End Sub
Private Sub Form_Resize()
WebBrowser1.Height = Form1.ScaleHeight - 1560
WebBrowser1.Width = Form1.ScaleWidth - 200
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Command1_Click
End Sub
Private Sub WebBrowser1_DownloadBegin()
Command7.Visible = True
StatusBar1.Panels(1).Text = " 正在下载中..."
End Sub
Private Sub WebBrowser1_DownloadComplete()
Command7.Visible = False
StatusBar1.Panels(1).Text = " 完成"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -