?? frmbrowser.frm
字號(hào):
VERSION 5.00
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "SHDOCVW.DLL"
Begin VB.Form frmBrowser
ClientHeight = 5130
ClientLeft = 3060
ClientTop = 3345
ClientWidth = 6540
Icon = "frmBrowser.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 5130
ScaleWidth = 6540
ShowInTaskbar = 0 'False
Begin VB.ComboBox cboAddress
Height = 300
Left = 840
TabIndex = 14
Text = "Combo1"
Top = 840
Width = 5595
End
Begin VB.PictureBox Picture1
Align = 1 'Align Top
Height = 792
Left = 0
ScaleHeight = 735
ScaleWidth = 6480
TabIndex = 1
Top = 0
Width = 6540
Begin VB.CommandButton Command6
Caption = "搜索"
Height = 740
Left = 3720
Picture = "frmBrowser.frx":0442
Style = 1 'Graphical
TabIndex = 13
Top = 0
Width = 740
End
Begin VB.CommandButton Command5
Caption = "首頁(yè)"
Height = 740
Left = 2980
Picture = "frmBrowser.frx":074C
Style = 1 'Graphical
TabIndex = 12
Top = 0
Width = 740
End
Begin VB.CommandButton Command4
Caption = "刷新"
Height = 740
Left = 2230
Picture = "frmBrowser.frx":0A56
Style = 1 'Graphical
TabIndex = 11
Top = 0
Width = 740
End
Begin VB.CommandButton Command3
Caption = "停止"
Height = 740
Left = 1490
Picture = "frmBrowser.frx":0D60
Style = 1 'Graphical
TabIndex = 10
Top = 0
Width = 740
End
Begin VB.CommandButton Command2
Caption = "向前"
Height = 740
Left = 740
Picture = "frmBrowser.frx":0E62
Style = 1 'Graphical
TabIndex = 9
Top = 0
Width = 740
End
Begin VB.CommandButton Command1
Caption = "向后"
Height = 740
Left = 0
Picture = "frmBrowser.frx":116C
Style = 1 'Graphical
TabIndex = 8
Top = 0
Width = 740
End
Begin VB.CommandButton Command7
Caption = "關(guān)于"
Height = 740
Left = 6710
Picture = "frmBrowser.frx":1476
Style = 1 'Graphical
TabIndex = 7
Top = 0
Width = 740
End
Begin VB.CommandButton Command8
Caption = "幫助"
Height = 740
Left = 7460
Picture = "frmBrowser.frx":1780
Style = 1 'Graphical
TabIndex = 6
Top = 0
Width = 740
End
Begin VB.CommandButton Command9
Caption = "退出"
Height = 740
Left = 8210
Picture = "frmBrowser.frx":1A8A
Style = 1 'Graphical
TabIndex = 5
Top = 0
Width = 740
End
Begin VB.CommandButton Command10
Caption = "導(dǎo)航"
Height = 740
Left = 4460
Picture = "frmBrowser.frx":1D94
Style = 1 'Graphical
TabIndex = 4
Top = 0
Width = 740
End
Begin VB.CommandButton Command11
Caption = "作弊"
Height = 740
Left = 5210
Picture = "frmBrowser.frx":209E
Style = 1 'Graphical
TabIndex = 3
Top = 0
Width = 740
End
Begin VB.CommandButton Command12
Caption = "停止"
Height = 740
Left = 5960
Picture = "frmBrowser.frx":23A8
Style = 1 'Graphical
TabIndex = 2
ToolTipText = "停止作弊"
Top = 0
Width = 740
End
End
Begin VB.Timer timTimer
Enabled = 0 'False
Interval = 5
Left = 6180
Top = 1500
End
Begin SHDocVwCtl.WebBrowser brwWebBrowser
Height = 6255
Left = 120
TabIndex = 0
Top = 1200
Width = 11400
ExtentX = 20108
ExtentY = 11033
ViewMode = 0
Offline = 0
Silent = 0
RegisterAsBrowser= 0
RegisterAsDropTarget= 1
AutoArrange = 0 'False
NoClientEdge = 0 'False
AlignLeft = 0 'False
NoWebView = 0 'False
HideFileNames = 0 'False
SingleClick = 0 'False
SingleSelection = 0 'False
NoFolders = 0 'False
Transparent = 0 'False
ViewID = "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
Location = "http:///"
End
Begin VB.Label Label1
Caption = "地址欄:"
Height = 375
Left = 120
TabIndex = 15
Top = 900
Width = 735
End
End
Attribute VB_Name = "frmBrowser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public StartingAddress As String
Dim mbDontNavigateNow As Boolean
Private Sub Command1_Click()
brwWebBrowser.GoBack
End Sub
Private Sub Command10_Click()
brwWebBrowser.GoSearch
End Sub
Private Sub Command2_Click()
brwWebBrowser.GoForward
End Sub
Private Sub Command3_Click()
brwWebBrowser.Stop
Me.Caption = brwWebBrowser.LocationName
End Sub
Private Sub Command4_Click()
brwWebBrowser.Refresh
End Sub
Private Sub Command5_Click()
brwWebBrowser.GoHome
End Sub
Private Sub Form_Load()
On Error Resume Next
Me.Show
tbToolBar.Refresh
Form_Resize
cboAddress.Move 50, lblAddress.Top + lblAddress.Height + 15
If Len(StartingAddress) > 0 Then
cboAddress.Text = StartingAddress
cboAddress.AddItem cboAddress.Text
'嘗試定位到起始地址
timTimer.Enabled = True
brwWebBrowser.Navigate StartingAddress
End If
End Sub
Private Sub brwWebBrowser_DownloadComplete()
On Error Resume Next
Me.Caption = brwWebBrowser.LocationName
End Sub
Private Sub brwWebBrowser_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
On Error Resume Next
Dim i As Integer
Dim bFound As Boolean
Me.Caption = brwWebBrowser.LocationName
For i = 0 To cboAddress.ListCount - 1
If cboAddress.List(i) = brwWebBrowser.LocationURL Then
bFound = True
Exit For
End If
Next i
mbDontNavigateNow = True
If bFound Then
cboAddress.RemoveItem i
End If
cboAddress.AddItem brwWebBrowser.LocationURL, 0
cboAddress.ListIndex = 0
mbDontNavigateNow = False
End Sub
Private Sub cboAddress_Click()
If mbDontNavigateNow Then Exit Sub
timTimer.Enabled = True
brwWebBrowser.Navigate cboAddress.Text
End Sub
Private Sub cboAddress_KeyPress(KeyAscii As Integer)
On Error Resume Next
If KeyAscii = vbKeyReturn Then
cboAddress_Click
End If
End Sub
Private Sub Form_Resize()
On Error Resume Next
cboAddress.Width = Me.ScaleWidth - 500
brwWebBrowser.Width = Me.ScaleWidth - 100
brwWebBrowser.Height = Me.ScaleHeight - (picAddress.Top + picAddress.Height) - 100
End Sub
Private Sub timTimer_Timer()
If brwWebBrowser.Busy = False Then
timTimer.Enabled = False
Me.Caption = brwWebBrowser.LocationName
Else
Me.Caption = "Working..."
End If
End Sub
Private Sub tbToolBar_ButtonClick(ByVal Button As Button)
On Error Resume Next
timTimer.Enabled = True
Select Case Button.Key
Case "Back"
brwWebBrowser.GoBack
Case "Forward"
brwWebBrowser.GoForward
Case "Refresh"
brwWebBrowser.Refresh
Case "Home"
brwWebBrowser.GoHome
Case "Search"
brwWebBrowser.GoSearch
Case "Stop"
timTimer.Enabled = False
brwWebBrowser.Stop
Me.Caption = brwWebBrowser.LocationName
End Select
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -