像WINAMP一樣可以顯示MP3文件的歌名。歌手名。專輯等信息
解决方案 »
- powerpoint中如何使用vba将2003格式ppt转换为2007?
- 问有无措施解除RealPlayer这种限制?
- 又不知道哪错啦,麻烦哪个高人进来看帮忙看一下。
- 将多个txt文件拖入FileListBox时报错
- 请问
- 菜鸟提问:请看一下我这个参数调用有什么问题
- VB中有没有这样的函数,能够判断一个变量在某个范围内.
- 如果本地新增10条记录后,如何批量传送到sql server对应表中保存.
- 求VBA连接数据库SybaseIQ的连接?谢谢
- 请问怎么样获得当天的日期??我只要日期不要时间,使用NOW()函数时连时间都包含进来了,达不到我想要的效果,请各位帮帮忙.
- [求助]QB中一个类型不匹配的问题
- 【问】如何捕捉全局的鼠标滚轮事件?
Me.MediaPlayer1.FileName '取得正在播放的文件的文件名
Option Explicit Private Type TagInfo
Tag As String * 3 '找到tag三个字节
SongName As String * 30 '歌曲名字
Gcj As String * 30 '艺术家
JnC As String * 30 '纪念册
Year As String * 4 '年月份
ZhuShi As String * 30 '注释
LiuPai As String * 1 '流派
End Type
Dim CcOunt As TagInfo
Dim FilePata As StringPrivate Sub Command1_Click()
Dim FileNameS As String
Dim ret As Long
Cdg.Filter = "Mp3文件|*.mp3"
Cdg.ShowOpen
FileNameS = Cdg.FileName
If FileNameS <> "" Then
ret = ReadFile(FileNameS)
End If
If ret = True Then
Text6.Text = FileNameS
With CcOunt
Text1.Text = .SongName
Text2.Text = .Gcj
Text3.Text = .JnC
Text4.Text = .Year
Text5.Text = .ZhuShi
Text8.Text = .LiuPai
End With
Else
Exit Sub
End If
End SubPublic Function ReadFile(FileName As String) As BooleanDim L As Long
Dim F As String * 3
Open FileName For Binary As #1
With CcOunt
Get #1, FileLen(FileName) - 127, F
If F = "TAG" Then
ReadFile = True
Seek #1, FileLen(FileName) - 124 '定位到124处取出30个字节是歌的名字
Get #1, , .SongName
Seek #1, FileLen(FileName) - 94 '定位到94(124-30)取出30个字节是唱这首歌曲的人
Get #1, , .Gcj
Seek #1, FileLen(FileName) - 64 '定位到64处(94-30)取出30个字节是专辑的名称
Get #1, , .JnC
Seek #1, FileLen(FileName) - 34 '定位到34(64-30)取出4个字节是年月日
Get #1, , .Year
Seek #1, FileLen(FileName) - 30 '定位到30处(34-4)取出30个字节是注释
Get #1, , .ZhuShi
Seek #1, FileLen(FileName) - 0 '定位到4处取出1个字节
Get #1, , .LiuPai
Close #1
Else
ReadFile = False
End If
End With
End Function
Tag As String * 3 '找到tag三个字节
SongName As String * 30 '歌曲名字
Gcj As String * 30 '艺术家
JnC As String * 30 '纪念册
Year As String * 4 '年月份
ZhuShi As String * 30 '注释
LiuPai As String * 1 '流派
End Type
LiuPai As String * 1 应该为 liuPai as byte
有没有读写RM的模块?