📄 frmmenu.frm
字号:
VERSION 5.00
Object = "{22D6F304-B0F6-11D0-94AB-0080C74C7E95}#1.0#0"; "msdxm.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmMenu
Caption = "把进度条放到任务栏里"
ClientHeight = 900
ClientLeft = 165
ClientTop = 795
ClientWidth = 4125
LinkTopic = "Form1"
ScaleHeight = 900
ScaleWidth = 4125
StartUpPosition = 3 '窗口缺省
Begin MSComDlg.CommonDialog CommonDialog1
Left = 180
Top = 240
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MediaPlayerCtl.MediaPlayer MediaPlayer
Height = 645
Left = 960
TabIndex = 0
Top = 180
Width = 2355
AudioStream = -1
AutoSize = 0 'False
AutoStart = -1 'True
AnimationAtStart= -1 'True
AllowScan = -1 'True
AllowChangeDisplaySize= -1 'True
AutoRewind = 0 'False
Balance = 0
BaseURL = ""
BufferingTime = 5
CaptioningID = ""
ClickToPlay = -1 'True
CursorType = 0
CurrentPosition = -1
CurrentMarker = 0
DefaultFrame = ""
DisplayBackColor= 0
DisplayForeColor= 16777215
DisplayMode = 0
DisplaySize = 4
Enabled = -1 'True
EnableContextMenu= -1 'True
EnablePositionControls= -1 'True
EnableFullScreenControls= 0 'False
EnableTracker = -1 'True
Filename = ""
InvokeURLs = -1 'True
Language = -1
Mute = 0 'False
PlayCount = 0
PreviewMode = 0 'False
Rate = 1
SAMILang = ""
SAMIStyle = ""
SAMIFileName = ""
SelectionStart = -1
SelectionEnd = -1
SendOpenStateChangeEvents= -1 'True
SendWarningEvents= -1 'True
SendErrorEvents = -1 'True
SendKeyboardEvents= 0 'False
SendMouseClickEvents= 0 'False
SendMouseMoveEvents= 0 'False
SendPlayStateChangeEvents= -1 'True
ShowCaptioning = 0 'False
ShowControls = -1 'True
ShowAudioControls= -1 'True
ShowDisplay = 0 'False
ShowGotoBar = 0 'False
ShowPositionControls= -1 'True
ShowStatusBar = 0 'False
ShowTracker = -1 'True
TransparentAtStart= 0 'False
VideoBorderWidth= 0
VideoBorderColor= 0
VideoBorder3D = 0 'False
Volume = -600
WindowlessVideo = 0 'False
End
Begin VB.Menu mnuMain
Caption = "Main"
Begin VB.Menu mnuMp3
Caption = "选择文件"
End
Begin VB.Menu mnuStopMp3
Caption = "停止播放"
End
Begin VB.Menu mnuSkin
Caption = "Skins"
Begin VB.Menu mnuBlack
Caption = "黑色"
End
Begin VB.Menu mnuGray
Caption = "灰色"
End
End
Begin VB.Menu mnuSep1
Caption = "-"
End
Begin VB.Menu mnuExit
Caption = "退出"
End
End
End
Attribute VB_Name = "frmMenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub mnuBlack_Click()
T = "1"
success = WritePrivateProfileString("cfmp3", "skins", T, Environ("UserProfile") & "\Application Data\cfmp3.ini")
End Sub
Private Sub mnuExit_Click()
Unload frmMain
Unload Me
End
End Sub
Private Sub mnuGray_Click()
T = "2"
success = WritePrivateProfileString("cfmp3", "skins", T, Environ("UserProfile") & "\Application Data\cfmp3.ini")
End Sub
Private Sub mnuMp3_Click()
Dim DlgInfo As DlgFileInfo
Dim I As Integer
On Error GoTo ErrHandle
'选择文件
With CommonDialog1
.CancelError = True
.MaxFileSize = 32767 '被打开的文件名尺寸设置为最大,即32K
.Flags = cdlOFNHideReadOnly Or cdlOFNAllowMultiselect Or cdlOFNExplorer Or cdlOFNNoDereferenceLinks
.DialogTitle = "选择文件"
.Filter = "支持文件(*.mp3;*.wma)|*.mp3;*.wma"
.ShowOpen
DlgInfo = GetDlgSelectFileInfo(.FileName)
.FileName = "" '在打开了*.pif文件后须将Filename属性置空,
'否则当选取多个*.pif文件后,当前路径会改变
End With
If MediaPlayer.PlayState <> 6 Then MediaPlayer.Stop: MediaPlayer.FileName = ""
Open Environ("UserProfile") & "\Application Data\cfmp3.m3u" For Output As #1
For I = 1 To DlgInfo.iCount
Print #1, DlgInfo.sPath & DlgInfo.sFile(I)
Next I
Close (1)
frmMain.Mp3Play_Click
ErrHandle:
' 按了“取消”按钮
End Sub
Private Sub mnuStopMp3_Click()
frmMain.Picture = frmMain.Pimg.Picture
frmMain.frmShow True
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -