📄 frmmain.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "ComDlg32.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "ieframe.dll"
Begin VB.Form frmMain
Caption = "12娱乐在线网络电视 2007 第一版 Http://www.12yule.com"
ClientHeight = 7065
ClientLeft = 165
ClientTop = 450
ClientWidth = 12255
Icon = "frmMain.frx":0000
LinkTopic = "Form1"
ScaleHeight = 7065
ScaleWidth = 12255
StartUpPosition = 2 '屏幕中心
WindowState = 2 'Maximized
Begin VB.Timer timTimer
Enabled = 0 'False
Interval = 5
Left = 6720
Top = 2520
End
Begin VB.PictureBox picAddress
Align = 1 'Align Top
BorderStyle = 0 'None
Height = 315
Left = 0
ScaleHeight = 315
ScaleWidth = 12255
TabIndex = 1
TabStop = 0 'False
Top = 0
Width = 12255
Begin VB.ComboBox cboAddress
Height = 300
Left = 3600
TabIndex = 2
Text = "Http://www.12yule.com/tv"
Top = 0
Width = 3435
End
Begin VB.Label lblAddress
Caption = "按回车开始看电视和在线电影:"
BeginProperty Font
Name = "黑体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 120
TabIndex = 3
Tag = "地址(&A):"
Top = 60
Width = 3315
End
End
Begin MSComctlLib.StatusBar sbStatusBar
Align = 2 'Align Bottom
Height = 270
Left = 0
TabIndex = 0
Top = 6795
Width = 12255
_ExtentX = 21616
_ExtentY = 476
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 15505
Text = "状态"
TextSave = "状态"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
AutoSize = 2
Object.Width = 3016
TextSave = "2007/01/05 星期五"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
AutoSize = 2
TextSave = "21:40"
EndProperty
EndProperty
End
Begin MSComDlg.CommonDialog dlgCommonDialog
Left = 7560
Top = 4200
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin SHDocVwCtl.WebBrowser brwWebBrowser
Height = 5295
Left = 0
TabIndex = 4
Top = 840
Width = 8520
ExtentX = 15028
ExtentY = 9340
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 = ""
End
Begin MSComctlLib.ImageList imlToolbarIcons
Left = 6600
Top = 1440
_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 = "frmMain.frx":51D2
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":58E4
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":5FF6
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":6708
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":6E1A
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":752C
Key = ""
EndProperty
EndProperty
End
Begin VB.Label Label1
Caption = "值此2007年新年到来之际,12娱乐网祝所有网友新年快乐、万事如意、心想事成、合家欢乐、新年大发财!"
BeginProperty Font
Name = "华文中宋"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Left = 1920
TabIndex = 5
Top = 480
Width = 11535
End
Begin VB.Menu mnuFile
Caption = "文件(&F)"
Begin VB.Menu mnuFileExit
Caption = "退出(&X)"
End
End
Begin VB.Menu mnuHelp
Caption = "帮助(&H)"
Begin VB.Menu mnuHelpAbout
Caption = "关于(&A) "
End
End
End
Attribute VB_Name = "frmMain"
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 Form_Load()
Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim i As Integer
'close all sub forms
For i = Forms.Count - 1 To 1 Step -1
Unload Forms(i)
Next
If Me.WindowState <> vbMinimized Then
SaveSetting App.Title, "Settings", "MainLeft", Me.Left
SaveSetting App.Title, "Settings", "MainTop", Me.Top
SaveSetting App.Title, "Settings", "MainWidth", Me.Width
SaveSetting App.Title, "Settings", "MainHeight", Me.Height
End If
End Sub
Private Sub mnuHelpAbout_Click()
frmAbout.Show vbModal, Me
End Sub
Private Sub mnuFileExit_Click()
'卸载窗体
Unload Me
End Sub
Private Sub picAddress_Click()
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 - 100
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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -