📄 media.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 = "{C1A8AF28-1257-101B-8FB0-0020AF039CA3}#1.1#0"; "MCI32.ocx"
Begin VB.Form Form6
BorderStyle = 1 'Fixed Single
Caption = "我的媒体库"
ClientHeight = 6270
ClientLeft = 45
ClientTop = 330
ClientWidth = 11505
FillColor = &H00808080&
ForeColor = &H00000000&
Icon = "Media.frx":0000
LinkTopic = "Form6"
MaxButton = 0 'False
ScaleHeight = 6270
ScaleWidth = 11505
StartUpPosition = 3 '窗口缺省
Begin MSComDlg.CommonDialog cdg
Left = 3360
Top = 2760
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton Command2
Caption = "保存更改"
Height = 495
Left = 10200
TabIndex = 14
Top = 3720
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "暂停播放"
Height = 495
Left = 10200
TabIndex = 13
Top = 4320
Width = 1215
End
Begin VB.CommandButton cmdExit
Caption = " 退 出(&Q)"
Height = 495
Left = 10200
TabIndex = 12
Top = 4920
Width = 1215
End
Begin VB.CommandButton cmdAddFile
Caption = "添加结点文件"
Height = 495
Left = 10200
TabIndex = 11
Top = 3120
Width = 1215
End
Begin VB.CommandButton cmdNewName
Caption = "重命名该结点"
Height = 495
Left = 10200
TabIndex = 10
Top = 2520
Width = 1215
End
Begin VB.CommandButton cmdPlay
Caption = "播放该列表"
Height = 495
Left = 10200
TabIndex = 9
Top = 1920
Width = 1215
End
Begin VB.CommandButton cmdEdite
Caption = "编辑播放列表"
Height = 495
Left = 10200
TabIndex = 8
Top = 1320
Width = 1215
End
Begin VB.CommandButton cmdDel
Caption = "移除结点"
Height = 495
Left = 10200
TabIndex = 7
Top = 720
Width = 1215
End
Begin VB.CommandButton cmdAddNode
Caption = "新建结点"
Height = 495
Left = 10200
TabIndex = 6
Top = 120
Width = 1215
End
Begin MSComctlLib.ImageList ImageList1
Left = 4920
Top = 2880
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 16
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":27A2
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":4B84
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":66D8
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":795A
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":8234
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":9F3E
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":BC48
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":D79C
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":F2F0
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":F60A
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":FEE4
Key = ""
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":107BE
Key = ""
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":12312
Key = ""
EndProperty
BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":1262C
Key = ""
EndProperty
BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":12F06
Key = ""
EndProperty
BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Media.frx":13D58
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.TreeView TreeView1
Height = 5775
Left = 0
TabIndex = 5
Top = 0
Width = 3615
_ExtentX = 6376
_ExtentY = 10186
_Version = 393217
Style = 7
ImageList = "ImageList1"
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSComctlLib.Slider Slider1
Height = 375
Left = 0
TabIndex = 3
Top = 5880
Width = 3735
_ExtentX = 6588
_ExtentY = 661
_Version = 393216
OLEDropMode = 1
LargeChange = 50
TickStyle = 3
End
Begin MCI.MMControl MCI
Height = 375
Left = 3120
TabIndex = 1
Top = 6480
Width = 3615
_ExtentX = 6376
_ExtentY = 661
_Version = 393216
DeviceType = ""
FileName = ""
End
Begin VB.ListBox List1
BackColor = &H80000008&
ForeColor = &H0000C000&
Height = 5280
ItemData = "Media.frx":14632
Left = 3600
List = "Media.frx":14639
MultiSelect = 2 'Extended
TabIndex = 0
Top = 480
Width = 6495
End
Begin VB.Label Label10
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Label10"
Height = 300
Left = 4080
TabIndex = 4
Top = 5880
Width = 1110
End
Begin VB.Label Label6
BackColor = &H80000008&
BorderStyle = 1 'Fixed Single
Caption = " 文件名"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 495
Left = 3600
TabIndex = 2
Top = 0
Width = 6495
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
'Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
'Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
'Private Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
'Private Const GWL_STYLE = (-16)
'Private Const COLOR_WINDOW = 5
'Private Const COLOR_WINDOWTEXT = 8
'Private Const TVS_HASLINES As Long = 2
'Private Const TV_FIRST As Long = &H100
'Private Const TVM_SETBKCOLOR As Long = (TV_FIRST + 29)
'Private Const TVM_SETTEXTCOLOR As Long = (TV_FIRST + 30)
'Private Const TVM_GETBKCOLOR As Long = (TV_FIRST + 31)
'Private Const TVM_GETTEXTCOLOR As Long = (TV_FIRST + 32)
'Private Function gettvbackcolour() As Long
'Dim clrref As Long
' Dim hwndtv As Long
' hwndtv = TreeView1.hwnd
' clrref = SendMessage(hwndtv, TVM_GETBKCOLOR, 0, ByVal 0)
'If crref = -1 Then
' clrref = GetSysColor(COLOR_WINDOW)
'End If
'gettvforecolour = clrref
'End Function
'Private Sub settvbackcolour(clrref As Long)
' Dim hwndtv As Long
' Dim style As Long
'hwndtv = TreeView1.hwnd
'Call SendMessage(hwndtv, TVM_setbkclor, 0, ByVal clrref)
'style = GetWindowLong(TreeView1.hwnd, GWL_STYLE)
' If style And TVS_HASLINES Then
' Call SetWindowLong(hwndtv, GWL_STYLE, style Xor TVS_HASLINES)
'' Call SetWindowLong(hwndtv, GWL_STYLE, style)
' End If
' End Sub
''Private Sub settvforecolour(clrref As Long)
' Dim hwndtv As Long
' Dim style As Long
'hwndtv = TreeView1.hwnd
'C'all SendMessage(hwndtv, TVM_SETTEXTCOLOR, 0, ByVal clrref)
' style = GetWindowLong(TreeView1.hwnd, GWL_STYLE)
'If style And TVS_HASLINES Then
' Call SetWindowLong(hwndtv, GWL_STYLE, style Xor TVS_HASLINES)
' Call SetWindowLong(hendtv, GWL_STYLE, style)
'End' If
'End Sub
Sub savefile(strfile As String)
Dim ndroot As Node
Dim ifilenum As Integer '//保存文件
Set ndroot = TreeView1.Nodes.Item(1)
Open strfile For Output As #1
Print #1, ndroot.Text & ","
If (ndroot.Children > 0) Then
writechildrentofile ndroot, ndroot.Children, ifilenum
End If
Close #1
End Sub
Sub writechildrentofile(ndnode As Node, inumberofchildren, ifilenum As Integer)
Dim icounter As Integer
Dim ndtempnode As Node '//将结点写入文件
Set ndtempnode = ndnode.Child
For icounter = 1 To inumberofchildren
Print #1, ndtempnode.Text & "," & ndtempnode.Parent.Text
If (ndtempnode.Children > 0) Then
writechildrentofile ndtempnode, ndtempnode.Children, 1
End If
Set ndtempnode = ndtempnode.Next
Next icounter
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -