📄 frmie.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 FrmIE
Caption = "My Internet Explorer"
ClientHeight = 3780
ClientLeft = 60
ClientTop = 345
ClientWidth = 6525
LinkTopic = "Form1"
ScaleHeight = 3780
ScaleWidth = 6525
StartUpPosition = 3 '窗口缺省
Begin SHDocVwCtl.WebBrowser WebBrowser1
Height = 2415
Left = 120
TabIndex = 4
Top = 1200
Width = 5535
ExtentX = 9763
ExtentY = 4260
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.PictureBox PicAddress
Align = 1 'Align Top
BorderStyle = 0 'None
Height = 495
Left = 0
ScaleHeight = 495
ScaleWidth = 6525
TabIndex = 1
Top = 675
Width = 6525
Begin VB.ComboBox CboAddress
Height = 300
Left = 840
TabIndex = 3
Text = "Combo1"
Top = 120
Width = 5535
End
Begin VB.Label LabAddress
Caption = "地址:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 120
TabIndex = 2
Top = 160
Width = 630
End
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 675
Left = 0
TabIndex = 0
Top = 0
Width = 6525
_ExtentX = 11509
_ExtentY = 1191
ButtonWidth = 1455
ButtonHeight = 1138
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 7
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "后退"
Key = "back"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "前进"
Key = "forward"
ImageIndex = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "停止"
Key = "stop"
ImageIndex = 3
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "刷新"
Key = "refresh"
ImageIndex = 4
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "主页"
Key = "home"
ImageIndex = 5
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "经典网站"
ImageIndex = 6
Style = 5
BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628}
NumButtonMenus = 4
BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "cnjava"
Text = "Java中文网站"
EndProperty
BeginProperty ButtonMenu2 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "javaworld"
Text = "Java开发者"
EndProperty
BeginProperty ButtonMenu3 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "aspcn"
Text = "ASPCN网站"
EndProperty
BeginProperty ButtonMenu4 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "phpx"
Text = "中国PHP联盟"
EndProperty
EndProperty
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList ImageList1
Left = 5880
Top = 1320
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 24
ImageHeight = 24
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 6
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmIE.frx":0000
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmIE.frx":0714
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmIE.frx":0E28
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmIE.frx":153C
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmIE.frx":1C50
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmIE.frx":2364
Key = ""
EndProperty
EndProperty
End
End
Attribute VB_Name = "FrmIE"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cboAddress_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then ' 若按回车键
WebBrowser1.Navigate CboAddress.Text ' 导航到指定的网站
End If
End Sub
Private Sub Form_Load()
Me.Show
Form_Resize
WebBrowser1.Navigate "about:blank"
End Sub
Private Sub Form_Resize()
On Error Resume Next
CboAddress.Width = FrmIE.ScaleWidth - LabAddress.Width - 500
WebBrowser1.Width = FrmIE.ScaleWidth - 200
WebBrowser1.Height = FrmIE.ScaleHeight - (PicAddress.Top + PicAddress.Height) - 100
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "back"
WebBrowser1.GoBack
Case "forward"
WebBrowser1.GoForward
Case "refresh"
WebBrowser1.Refresh
Case "home"
WebBrowser1.GoHome
Case "stop"
WebBrowser1.Stop
FrmIE.Caption = "My Internet Explorer-" & WebBrowser1.LocationName
End Select
End Sub
Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu)
Select Case ButtonMenu.Key
Case "cnjava"
WebBrowser1.Navigate "http://www.cn-java.com"
Case "javaworld"
WebBrowser1.Navigate "http://www.Chinajavaworld.com"
Case "aspcn"
WebBrowser1.Navigate "http://www.aspcn.com"
Case "phpx"
WebBrowser1.Navigate "http://www.phpx.com"
End Select
End Sub
Private Sub WebBrowser1_DownloadComplete()
FrmIE.Caption = "My Internet Explorer-" & WebBrowser1.LocationName
End Sub
Private Sub WebBrowser1_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
Dim n As Integer
Dim bFound As Boolean
FrmIE.Caption = "My Internet Explorer-" & WebBrowser1.LocationName
For n = 0 To CboAddress.ListCount - 1
If CboAddress.List(n) = WebBrowser1.LocationURL Then
bFound = True
Exit For
End If
Next
If bFound Then
CboAddress.RemoveItem n
End If
CboAddress.AddItem WebBrowser1.LocationURL, 0
CboAddress.ListIndex = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -