?? mdtv.frm
字號(hào):
End Sub
Private Sub LblLeft_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LblDT.Caption = "提示:快/慢退播放位"
End Sub
Private Sub LblMin_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button <> 1 Then Exit Sub
Me.Top = -Me.Height + 60
Me.Left = (Screen.Width - Me.Width) \ 2
End Sub
Private Sub LblMin_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LblDT.Caption = "提示: 屏幕上方隱藏"
End Sub
Private Sub LblPause_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
If Button = 1 Then
If InStr(1, tURL, "://", vbTextCompare) > 0 Then
If mType = 1 Then
wmp.Controls.stop
ElseIf mType = 2 Then
rm.DoStop
End If
Else
On Error Resume Next
If mType = 1 Then
wmp.Controls.pause
ElseIf mType = 2 Then
rm.DoPlayPause
ElseIf mType = 3 Then
Unload Form4
ElseIf mType = 4 Then
Unload Form5
End If
End If
Timer1.Enabled = False
LblCs.Caption = "【" + tName + "】"
'LblCs.Left = (Ps.Width - LblCs.Width) \ 2
End If
End Sub
Private Sub LblPause_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LblDT.Caption = "提示:停止/暫停播放"
End Sub
Private Sub LblPlay_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
On Error Resume Next
If mType = 1 Then
wmp.Controls.play
ElseIf mType = 2 Then
rm.DoPlay
ElseIf mType = 3 Then
Form1.Top = -Form1.Height + 60
Form1.LblCs.Caption = "【" + tName + "】 Flash "
Form4.Caption = tName
Form4.Show
Form4.swf.LoadMovie 0, tURL
Form4.swf.play
ElseIf mType = 4 Then
Form1.Top = -Form1.Height + 60
Form1.LblCs.Caption = "【" + tName + "】 DVD "
Form5.Caption = tName
Form5.Show
Form5.Amv.FileName = tURL
Form5.Amv.Run
End If
If tName <> "" Then LblCs.Caption = "【" + tName + "】"
Me.Refresh
Timer1.Enabled = True
End If
End Sub
Private Sub LblPlay_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LblDT.Caption = "提示:開始/繼續(xù)播放"
End Sub
Private Sub LblRight_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If mLen > 0 Then
mp = mPos / mLen
If Button = 1 Then
mp = mp + 0.05
Else
mp = mp + 0.01
End If
If mp >= 1 Then mp = 1
If Pv(0).Visible = True Then
wmp.Controls.currentPosition = mp * mLen
End If
If Pv(1).Visible = True Then
rm.SetPosition mp * mLen
End If
End If
End Sub
Private Sub LblRight_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LblDT.Caption = "提示:快/慢進(jìn)播放位"
End Sub
Private Sub LblSlt_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
SetFormTop Me, False
Timer1.Enabled = False
If Button = 1 Then
Form2.Left = Form1.Left + (Form1.Width - Form2.Width) \ 2
Form2.Top = Form1.Top + (Form1.Height - Form2.Height) \ 2 + 150
Form2.Show 1, Me
Else
Form3.Left = Form1.Left + (Form1.Width - Form3.Width) \ 2
Form3.Top = Form1.Top + (Form1.Height - Form3.Height) \ 2 + 150
Form3.Show 1, Me
End If
End Sub
Private Sub LblSlt_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LblDT.Caption = "提示:網(wǎng)絡(luò)/本地媒體"
End Sub
Private Sub LblVol1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
If Vol > 0 Then Vol = Vol - 5
Else
Vol = 0
End If
If mType = 1 Then
wmp.settings.volume = Vol
ElseIf mType = 2 Then
rm.SetVolume (Vol)
End If
SaveSetting App.Title, App.EXEName, "Vol", Vol
End Sub
Private Sub LblVol1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LblDT.Caption = "提示:音量減小/靜音"
End Sub
Private Sub LblVol2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
If Vol < 100 Then Vol = Vol + 5
Else
Vol = 100
End If
If mType = 1 Then
wmp.settings.volume = Vol
ElseIf mType = 2 Then
rm.SetVolume (Vol)
End If
SaveSetting App.Title, App.EXEName, "Vol", Vol
End Sub
Private Sub LblVol2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
LblDT.Caption = "提示:音量增加/最大"
End Sub
Private Sub Pb_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
mX = X: mY = Y: mV = 1
End If
End Sub
Private Sub Pb_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
If mV = 1 Then
Me.Left = Me.Left + X - mX
Me.Top = Me.Top + Y - mY
End If
If Me.Left = Screen.Width - 60 Then
Me.Left = Screen.Width - Me.Width
ElseIf Me.Left = -Me.Width + 60 Then
Me.Left = 0
ElseIf Me.Top = -Me.Height + 60 Then
Me.Top = 0
ElseIf Me.Top = Screen.Height - 60 Then
Me.Top = Screen.Height - Me.Height
End If
DT = Date$ & "," & Time$
If LblDT.Caption <> DT Then LblDT.Caption = DT
End Sub
Private Sub Pb_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
mV = 0
End Sub
Private Sub rm_OnPositionChange(ByVal lPos As Long, ByVal lLen As Long)
If Pv(1).Visible = True Then
Ps.Cls: mPos = lPos: mLen = lLen
If tName <> "" Then sT = "【" + tName + "】"
If lPos > 0 And lLen > 0 Then
'播放控制
If lPos > lLen - 1000 Then
If PlayFlag = 2 Then
Timer2.Enabled = False
Timer1.Enabled = False
rm.DoPlayPause
Pos = Pos + 1
Call LocalPlay
Timer1.Enabled = True
Timer2.Enabled = True
ElseIf PlayFlag = 1 Then
rm.DoStop: rm.DoPlay
End If
End If
'顯示進(jìn)度
Ps.Line (0, 0)-(lPos / lLen * Ps.Width - 60, Ps.Height), QBColor(2), BF
sT = sT + " 正在播放 >>> "
fp = FormatPercent(lPos / lLen)
If InStr(1, fp, ".") = 1 Then sT = sT + "0"
sT = sT + fp + " "
LblLeft.Enabled = True
LblRight.Enabled = True
ElseIf lPos > 0 And lLen = 0 Then
If PlayFlag = 0 Then sT = sT + " 動(dòng)感 "
ElseIf lPos = 0 And lLen = 0 Then
LblLeft.Enabled = False
LblRight.Enabled = False
End If
If sT <> "" And LblCs.Caption <> sT Then LblCs.Caption = sT
Me.Refresh
End If
End Sub
Private Sub Timer1_Timer()
If wmp.fullScreen = False And rm.GetFullScreen = False And Form4.Visible = False And Form5.Visible = False Then
SetFormTop Me, True
End If
'Windows media
If Pv(0).Visible = True Then
If tName <> "" Then sT = "【" + tName + "】"
If InStr(1, tURL, "://", vbTextCompare) > 0 Then '在線
If Trim(wmp.Status) <> "" Then
sT = sT + " " + Trim(wmp.Status) + " "
End If
Else '本地
If wmp.Controls.currentPositionString <> "" Then
sT = sT + " 正在播放 >>> " + wmp.Controls.currentPositionString + " "
End If
'長(zhǎng)度和位置
If mLen = 0 Then mLen = GetMediaLen(tURL)
mPos = wmp.Controls.currentPosition
'本地連續(xù)播放
If mLen > 0 Then
If mPos >= mLen Then
If PlayFlag = 2 Then '循環(huán)
Timer2.Enabled = False
Timer1.Enabled = False
Pos = Pos + 1
Call LocalPlay
Timer1.Enabled = True
Timer2.Enabled = True
End If
ElseIf mPos = 0 Then
If PlayFlag = 1 Then
If Pv(0).Visible = True Then
wmp.Controls.play
End If
End If
End If
End If
End If
'顯示信息
If sT <> "" And LblCs.Caption <> sT Then LblCs.Caption = sT
'顯示進(jìn)度
Ps.Cls
If mLen > 0 Then
Ps.Line (0, 0)-(mPos / mLen * Ps.Width - 60, Ps.Height), QBColor(2), BF
LblLeft.Enabled = True
LblRight.Enabled = True
Else
LblLeft.Enabled = False
LblRight.Enabled = False
End If
End If
End Sub
Private Sub Timer2_Timer()
Dim LRStp As Integer
Dim hW As Long
Dim p As POINTAPI
If Me.Top >= Screen.Height Then
Me.WindowState = vbNormal
End If
hW = FindWindow(vbNullString, "RealPlayer")
If hW <> 0 Then PostMessage hW, WM_CLOSE, 0&, 0&
'取得鼠標(biāo)位置
GetCursorPos p
iLeft = Me.Left \ Screen.TwipsPerPixelX
iRight = (Me.Left + Me.Width) \ Screen.TwipsPerPixelX
iTop = Me.Top \ Screen.TwipsPerPixelY
iBottom = (Me.Top + Me.Height) \ Screen.TwipsPerPixelY
'判斷鼠標(biāo)是否離開窗體
If Form2.Visible = False And Form3.Visible = False Then
If rm.GetFullScreen = False And wmp.fullScreen = False And Form4.Visible = False And Form5.Visible = False Then
If Timer1.Enabled = False Then Timer1.Enabled = True
End If
If p.X < iLeft Or p.X > iRight Or p.Y < iTop Or p.Y > iBottom Then
If Me.Left >= Screen.Width - Me.Width Then
Me.Left = Screen.Width - 60
ElseIf Me.Left <= 0 Then
Me.Left = -Me.Width + 60
ElseIf Me.Top <= 0 Then
Me.Top = -Me.Height + 60
ElseIf Me.Top >= Screen.Height - Me.Height Then
Me.Top = Screen.Height - 60
End If
End If
End If
'信息顯示
LRStp = 10
If LblCs.Width < Ps.Width Then '短
If mvFlag = -1 Then
If LblCs.Left + mvFlag * LRStp > -75 Then
LblCs.Left = LblCs.Left + mvFlag * LRStp
Else
LblCs.Left = -75
mvFlag = 1
End If
Else
If LblCs.Left + mvFlag * LRStp < Ps.Width - LblCs.Width + 60 Then
LblCs.Left = LblCs.Left + mvFlag * LRStp
Else
LblCs.Left = Ps.Width - LblCs.Width + 60
mvFlag = -1
End If
End If
Else '長(zhǎng)
If mvFlag = -1 Then
If LblCs.Left + mvFlag * LRStp > Ps.Width - LblCs.Width - 60 Then
LblCs.Left = LblCs.Left + mvFlag * LRStp
Else
LblCs.Left = Ps.Width - LblCs.Width - 60
mvFlag = 1
End If
Else
If LblCs.Left + mvFlag * LRStp < 0 Then
LblCs.Left = LblCs.Left + mvFlag * LRStp
Else
LblCs.Left = 0
mvFlag = -1
End If
End If
End If
End Sub
Private Sub Timer3_Timer()
Timer3.Enabled = False
Timer1.Enabled = True
Timer2.Enabled = True
Pb.Enabled = True
tName = GetSetting(App.Title, App.EXEName, "Name", "時(shí)尚電視臺(tái)")
tURL = GetSetting(App.Title, App.EXEName, "Url", "http://61.139.37.135:1560/blsz")
Pos = Val(GetSetting(App.Title, App.EXEName, "Idx", "0"))
Vol = Val(GetSetting(App.Title, App.EXEName, "Vol", 100))
PlayFlag = Val(GetSetting(App.Title, App.EXEName, "PlayFlag", 0))
mType = Val(GetSetting(App.Title, App.EXEName, "mType", 1))
vZooms = Val(GetSetting(App.Title, App.EXEName, "vZoom", 1))
Call Form_Resize
If tName <> "" Then LblCs.Caption = "【" + tName + "】"
On Error Resume Next
If mType = 1 Then
wmp.settings.volume = Vol
wmp.URL = tURL
Pv(0).Visible = True
ElseIf mType = 2 Then
rm.SetVolume (Vol)
rm.Source = tURL
Pv(1).Visible = True
ElseIf mType = 3 Then 'Flash
Form1.Top = -Form1.Height + 60
Form1.LblCs.Caption = "【" + tName + "】 Flash "
Form4.Caption = tName
Form4.Show
Form4.swf.LoadMovie 0, tURL
Form4.swf.play
ElseIf mType = 4 Then
Form1.Top = -Form1.Height + 60
Form1.LblCs.Caption = "【" + tName + "】 DVD "
Form5.Caption = tName
Form5.Show
Form5.Amv.FileName = tURL
Form5.Amv.Run
End If
Pt.Visible = False
Me.Refresh
End Sub
Private Sub vZoom_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
If Index = 0 Then '上
If vZooms + 0.05 < 1 Then
vZooms = vZooms + 0.05
Else
vZooms = 1
End If
Else '下
If vZooms - 0.05 > 0.5 Then
vZooms = vZooms - 0.05
Else
vZooms = 0.5
End If
End If
Else
If Index = 0 Then
vZooms = 1
Else
vZooms = 0.5
End If
End If
SaveSetting App.Title, App.EXEName, "vZoom", CStr(vZooms)
Call Form_Resize
End Sub
Private Sub vZoom_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Index = 0 Then
LblDT.Caption = "提示:視頻放大/原圖"
Else
LblDT.Caption = "提示:視頻縮小/半倍"
End If
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -