?? controlfrm.frm
字號:
Left = 1460
Picture = "Controlfrm.frx":D961
ScaleHeight = 480
ScaleWidth = 480
TabIndex = 14
ToolTipText = "快進(jìn)"
Top = 560
Visible = 0 'False
Width = 480
End
Begin VB.PictureBox AboutPic
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 180
Index = 1
Left = 600
Picture = "Controlfrm.frx":E62B
ScaleHeight = 180
ScaleWidth = 135
TabIndex = 16
ToolTipText = "幫助"
Top = 320
Width = 135
End
End
Attribute VB_Name = "Controlfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim NewCur As Long '新鼠標(biāo)標(biāo)記存儲
Dim OldCur As Long '舊鼠標(biāo)的存儲
'Dim MidCur As Long '過度鼠標(biāo)存儲
Dim PicName As Integer '確定經(jīng)過按鍵的編號
Private Sub AboutPic_Click(Index As Integer) '幫助
frmAbout.Show
End Sub
Private Sub AboutPic_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
AboutPic(0).Visible = False '鼠標(biāo)移動到時顯示
PicName = 7
End Sub
Private Sub BackPic_Click(Index As Integer)
GoBackFor (False) '回放
End Sub
Private Sub BackPic_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
BackPic(0).Visible = False '鼠標(biāo)移動到時顯示
PicName = 3
End Sub
Private Sub ClosePic_Click(Index As Integer) '退出
End
End Sub
Private Sub ClosePic_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
ClosePic(0).Visible = False
PicName = 6
End Sub
Private Sub DownPic_Click(Index As Integer)
With Showfrm.Media1 '下調(diào)音量
If .Volume <> -4000 Then .Volume = .Volume - 200
End With
End Sub
Private Sub DownPic_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
DownPic(0).Visible = False '鼠標(biāo)移動到時顯示
PicName = 5
End Sub
Private Sub Form_Load() '窗體啟動
OnForm.Top = Me.Height / 2 - OnForm.Height / 2
OnForm.Left = Me.Width / 2 - OnForm.Width / 2
toggleFrame Controlfrm, OnForm, True '隱形窗體
CirclePic Controlfrm '控件處理
NewCur = LoadCursorFromFile(App.Path + "\icon\first.cur")
'上面*.ANI動畫光標(biāo)的路徑可自己設(shè)定
OldCur = SetClassLong(OpenPic(0).hwnd, -12, NewCur)
ForFrm.Hide
frmAbout.Hide
MenuBar.Hide
Showfrm.Hide
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button <> vbLeftButton Then
'鼠標(biāo)移出控件時恢復(fù)圖標(biāo)
Select Case PicName
Case 0
OpenPic(0).Visible = True
Case 1
PlayPic(0).Visible = True
Case 2
FroPic(0).Visible = True
Case 3
BackPic(0).Visible = True
Case 4
UpPic(0).Visible = True
Case 5
DownPic(0).Visible = True
Case 6
ClosePic(0).Visible = True
Case 7
AboutPic(0).Visible = True
End Select
Exit Sub
End If
ReleaseCapture
SendMessage Me.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
SetClassLong OpenPic(0).hwnd, -12, OldCur '退出恢復(fù)
SetWindowRgn hwnd, 0, False
DeleteObject mFormRegion '清除內(nèi)存變量
DeleteObject PlPa
DeleteObject EndTimePos
DeleteObject EndFramePos
DeleteObject OldVolumn
DeleteObject CurTime
DeleteObject StartM
DeleteObject NewCur
'DeleteObject MidCur
DeleteObject OldCur
End Sub
Private Sub FroPic_Click(Index As Integer)
GoBackFor (True) '前進(jìn)
End Sub
Private Sub FroPic_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
FroPic(0).Visible = False '鼠標(biāo)移動到時顯示
PicName = 2
End Sub
Private Sub OpenPic_Click(Index As Integer) '開啟
Dim temp As Integer
On Error GoTo ErrHandler
temp = 1
PlPa = False
Do While temp
CommonDialog1.CancelError = False
CommonDialog1.Filter = "AVI (*.avi)|*.avi|MPEG (*.mpg;*.dat)|*.mpg;*.dat|Windows Media(*.asf;*.wn)|*.asf;*.wn|Movie (*.mov)|*.mov|MP3 (*.mp3;mp2)|*.mp3;mp2|WAV Sound (*.wav)|*.wav|MIDI Sequence (*.mid; *.rmi)|*.mid; *.rmi|AU (*.au)|*.au"
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "" Then
'顯示控件
OpenPic(0).Visible = True
OpenPic(1).Visible = True
PlayPic(0).Visible = True
PlayPic(1).Visible = True
UpPic(0).Visible = True
UpPic(1).Visible = True
DownPic(0).Visible = True
DownPic(1).Visible = True
BackPic(0).Visible = True
BackPic(1).Visible = True
FroPic(0).Visible = True
FroPic(1).Visible = True
StartM = True
CurTime = 10
temp = 0
OldVolumn = 0
'初使化
With Showfrm.Media1
.FileName = CommonDialog1.FileName
.CurrentPosition = &HFFFFFF
If .DisplayMode = mpFrames Then
EndFramePos = .CurrentPosition
.DisplayMode = mpTime
EndTimePos = .CurrentPosition
.DisplayMode = mpFrames
Else
EndTimePos = .CurrentPosition
.DisplayMode = mpFrames
EndFramePos = .CurrentPosition
.DisplayMode = mpTime
End If
.Volume = -2000
ChangeSize (1) '窗口設(shè)為默認(rèn)狀態(tài)
.CurrentPosition = 0 '位置恢復(fù)為0
If CommonDialog1.FilterIndex < 5 Then '為視頻模式啟動窗口
Showfrm.Show
Showfrm.Caption = CommonDialog1.FileName
Else
Showfrm.Visible = False '消失
End If
End With
Else '出錯判斷 1,未選文件
MsgBox "Plase Selcet One File To Play!", 16, "None Select"
End If
Loop
Exit Sub
ErrHandler: '出錯2 不認(rèn)識文件.
On Error GoTo 0
MsgBox CommonDialog1.FileName & " is not playable !", 16, "File Error"
End Sub
Private Sub OpenPic_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
OpenPic(0).Visible = False '鼠標(biāo)移動到時顯示
OpenPic(1).Visible = True
PicName = 0
End Sub
Private Sub PlayPic_Click(Index As Integer) '播放控制
On Error GoTo ErrorHandler
With Showfrm.Media1
PlayPbb '播放函數(shù)
End With
Exit Sub
ErrorHandler: '出錯判定
On Error GoTo 0
MsgBox CommonDialog1.FileName & " is not playable !", 16, "File Error"
End Sub
Private Sub PlayPic_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
PlayPic(0).Visible = False
PicName = 1 '鼠標(biāo)移動到時顯示
End Sub
Private Sub UpPic_Click(Index As Integer)
With Showfrm.Media1 '增大音量
If .Volume <> 0 Then .Volume = .Volume + 200
End With
End Sub
Private Sub UpPic_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
UpPic(0).Visible = False
PicName = 4
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -