📄 mp3_frm.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form mp3_frm
BackColor = &H80000013&
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 3855
ClientLeft = -90
ClientTop = -660
ClientWidth = 4725
Icon = "mp3_frm.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
MouseIcon = "mp3_frm.frx":0CCA
MousePointer = 99 'Custom
Picture = "mp3_frm.frx":1594
ScaleHeight = 3855
ScaleWidth = 4725
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.Timer Timer2
Interval = 500
Left = 4200
Top = 2280
End
Begin VB.Timer Timer1
Interval = 1000
Left = 4200
Top = 1800
End
Begin VB.Timer timer_labelplaying
Enabled = 0 'False
Interval = 500
Left = 4200
Top = 1320
End
Begin VB.Timer timer_repeat
Enabled = 0 'False
Interval = 1000
Left = 4200
Top = 840
End
Begin VB.HScrollBar volscroll
Height = 135
LargeChange = 600
Left = 1680
MouseIcon = "mp3_frm.frx":18D08
MousePointer = 99 'Custom
TabIndex = 3
Top = 840
Value = 32767
Width = 1095
End
Begin VB.ListBox mp3list
Appearance = 0 'Flat
BackColor = &H00FF0000&
ForeColor = &H80000005&
Height = 1785
Left = 120
TabIndex = 2
Top = 1920
Width = 3735
End
Begin MSComctlLib.ProgressBar ProgressBar1
Height = 135
Left = 240
TabIndex = 1
Top = 1080
Width = 3735
_ExtentX = 6588
_ExtentY = 238
_Version = 393216
Appearance = 0
End
Begin MSComDlg.CommonDialog CDialog
Left = 4200
Top = 360
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.PictureBox Picture1
Height = 375
Left = 4200
ScaleHeight = 315
ScaleWidth = 435
TabIndex = 0
Top = 0
Width = 495
End
Begin VB.Label labeltime
BackStyle = 0 'Transparent
Caption = "00:00"
BeginProperty Font
Name = "Arial"
Size = 15
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C0C0C0&
Height = 375
Left = 720
TabIndex = 5
Top = 240
Width = 855
End
Begin VB.Image imgdown
Height = 300
Left = 3840
Picture = "mp3_frm.frx":195D2
Top = 3360
Visible = 0 'False
Width = 135
End
Begin VB.Image imgup
Height = 300
Left = 3840
Picture = "mp3_frm.frx":19846
Top = 1920
Visible = 0 'False
Width = 135
End
Begin VB.Image imgremove_off
Height = 240
Left = 2400
Picture = "mp3_frm.frx":19ABA
ToolTipText = "remove file"
Top = 1320
Width = 300
End
Begin VB.Image imgremove_on
Height = 240
Left = 2400
Picture = "mp3_frm.frx":19EBE
Top = 1320
Visible = 0 'False
Width = 300
End
Begin VB.Image Image1
Height = 255
Left = 3720
ToolTipText = "about"
Top = 1320
Width = 255
End
Begin VB.Label label_playing
BackStyle = 0 'Transparent
BeginProperty Font
Name = "宋体"
Size = 8.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 135
Left = 1680
TabIndex = 4
Top = 360
Width = 1215
End
Begin VB.Image imgplaying
Height = 270
Left = 3120
Picture = "mp3_frm.frx":1A2C2
Top = 720
Visible = 0 'False
Width = 465
End
Begin VB.Image imglistexit
Height = 195
Left = 3960
Picture = "mp3_frm.frx":1A9C6
Top = 1680
Width = 120
End
Begin VB.Image imglist_on
Height = 180
Left = 3600
Picture = "mp3_frm.frx":1AB42
ToolTipText = "mp3list"
Top = 720
Width = 300
End
Begin VB.Image imglist_off
Height = 180
Left = 3600
Picture = "mp3_frm.frx":1AE56
ToolTipText = "mp3list"
Top = 720
Visible = 0 'False
Width = 300
End
Begin VB.Image imgshuf_off
Height = 225
Left = 2760
Picture = "mp3_frm.frx":1B16A
Top = 1320
Width = 585
End
Begin VB.Image imgshuf_on
Height = 225
Left = 2760
Picture = "mp3_frm.frx":1B8B6
Top = 1320
Visible = 0 'False
Width = 585
End
Begin VB.Image imgrep_off
Height = 225
Left = 3360
Picture = "mp3_frm.frx":1C002
ToolTipText = "autoplay"
Top = 1320
Width = 210
End
Begin VB.Image imgrep_on
Height = 225
Left = 3360
Picture = "mp3_frm.frx":1C2DA
ToolTipText = "autoplay"
Top = 1320
Visible = 0 'False
Width = 210
End
Begin VB.Image imglist
Height = 2175
Left = 0
Picture = "mp3_frm.frx":1C5B2
ToolTipText = "mp3list"
Top = 1680
Width = 4125
End
Begin VB.Image imgopenfile
Height = 240
Left = 2160
Picture = "mp3_frm.frx":39AF2
ToolTipText = "add file"
Top = 1320
Width = 300
End
Begin VB.Image imgpause_off
Height = 285
Left = 960
Picture = "mp3_frm.frx":39EF6
ToolTipText = "pause"
Top = 1320
Width = 345
End
Begin VB.Image imgstop_off
Height = 285
Left = 1320
Picture = "mp3_frm.frx":3A492
ToolTipText = "stop"
Top = 1320
Width = 345
End
Begin VB.Image imgplay_off
Height = 285
Left = 600
Picture = "mp3_frm.frx":3AA2E
ToolTipText = "play"
Top = 1320
Width = 345
End
Begin VB.Image imgnext_off
Height = 285
Left = 1680
Picture = "mp3_frm.frx":3AFCA
ToolTipText = "next song"
Top = 1320
Width = 345
End
Begin VB.Image imgprev_off
Height = 285
Left = 240
Picture = "mp3_frm.frx":3B566
ToolTipText = "previous song"
Top = 1320
Width = 345
End
Begin VB.Image imgplay_on
Height = 285
Left = 600
Picture = "mp3_frm.frx":3BB02
Top = 1320
Visible = 0 'False
Width = 345
End
Begin VB.Image imgprev_on
Height = 285
Left = 240
Picture = "mp3_frm.frx":3C09E
Top = 1320
Visible = 0 'False
Width = 345
End
Begin VB.Image imgnext_on
Height = 285
Left = 1680
Picture = "mp3_frm.frx":3C63A
Top = 1320
Visible = 0 'False
Width = 345
End
Begin VB.Image imgpause_on
Height = 285
Left = 960
Picture = "mp3_frm.frx":3CBD6
Top = 1320
Visible = 0 'False
Width = 345
End
Begin VB.Image imgstop_on
Height = 285
Left = 1320
Picture = "mp3_frm.frx":3D172
Top = 1320
Width = 345
End
Begin VB.Image imgtotil
Height = 210
Left = 0
MouseIcon = "mp3_frm.frx":3D70E
MousePointer = 99 'Custom
Picture = "mp3_frm.frx":3DFD8
Top = 0
Width = 3660
End
Begin VB.Image imgexit
Height = 195
Left = 3960
MouseIcon = "mp3_frm.frx":40824
MousePointer = 99 'Custom
Picture = "mp3_frm.frx":410EE
ToolTipText = "close"
Top = 0
Width = 120
End
Begin VB.Image imgmin
Height = 195
Left = 3840
Picture = "mp3_frm.frx":4126A
ToolTipText = "Minimize"
Top = 0
Width = 120
End
End
Attribute VB_Name = "mp3_frm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim t As NOTIFYICONDATA
Dim repeat As Boolean
Dim shuffle As Boolean
Dim totalsec As String
Dim mp3index As Integer
Dim list(500) As String
Dim pause As Boolean
Dim playingindex As Integer
Dim filename As String
Dim s As String
Dim temp_label As String
Dim labelsec As Integer
Dim labelmin As Integer
'Dim X(100) As Integer
'Dim Y(100) As Integer
'Dim size(100) As Integer
'Dim pace(100) As Integer
Private Sub Form_Activate()
'Randomize
'For i = 1 To 100
'X1 = Int(Me.Width * Rnd)
'Y1 = Int(Me.Height * Rnd)
'pace1 = Int(500 - (Int(Rnd * 499)))
'size1 = 25 * Rnd
'X(i) = X1
'Y(i) = Y1
'pace(i) = pace1
'size(i) = size1
'Next
End Sub
Private Sub Form_Initialize()
'程序唯一执行
If App.PrevInstance Then
End
End If
End Sub
Private Sub Form_Load()
Dim ret As Long
Dim retValue As Long
Dim I As Integer
'窗体总在最前面
retValue = SetWindowPos(Me.hwnd, HWND_TOPMOST, Me.CurrentX, Me.CurrentY, 300, 300, SWP_SHOWWINDOW)
'注册mp3文件为当前文件打开
softname = Trim$(App.Path & "\" & App.EXEName & ".exe")
regchange (softname)
Files = Command()
retValue = SetWindowPos(Me.hwnd, HWND_TOPMOST, Me.CurrentX, Me.CurrentY, 275, 45, SWP_SHOWWINDOWS)
'当前计算机是否安装声卡
I = waveOutGetNumDevs()
If I <= 0 Then
MsgBox "您的系统未安装声卡!!"
Unload Me
End If
'注册mp3文件
ret = mciSendString("OPEN mp3file Alias Sonido", 0, 0, 0)
ret = mciSendString("Play sonido", 0, 0, 0)
repeat = False
shuffle = False
mp3index = -1
Me.Height = 3855
Me.Width = 4125
pause = False
ProgressBar1.Value = ProgressBar1.Max
'addtask
End Sub
Private Sub Form_Unload(Cancel As Integer)
'将任务栏图标去除
t.cbSize = Len(t)
t.hwnd = Picture1.hwnd
t.uId = 1&
Shell_NotifyIcon NIM_DELETE, t
shuffle = False
repeat = False
Unload about
stopmp3
Dim I As Long
For I = 50 To Me.Height
If Me.Height > 400 Then
Me.Height = Me.Height - 1
End If
Next I
For I = 50 To Me.Width
If Me.Width > 500 Then
Me.Width = Me.Width - 1
End If
Next I
End Sub
Private Sub Image1_Click()
about.Show
End Sub
Private Sub imgdown_Click()
SendMessage mp3list.hwnd, WM_VSCROLL, SB_LINEDOWN, 0
ShowScrollBar mp3list.hwnd, SB_VERT, False
End Sub
Private Sub imgexit_Click()
Unload Me
End Sub
Private Sub imglist_off_Click()
imglist_off.Visible = False
imglist_on.Visible = True
Me.Height = 3855
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -