VBGood网站全文搜索 Google

搜索VBGood全站网页(全文搜索)
排序: 热度 日期 标题, 方式 倒序 顺序 VBGood首页 - 代码天地
评论:0, 阅读:10523, 日期:2000-11-08 [多媒体] 获得mp3文件的infomation
Working with MP3

Does your program need to work with MP3 files? Creating your own audio program or music library and need to automatically extract details such as the artist, track title and album? Perhaps you even need to overwrite such ID3 tags?

The winner of our SmartUI competition, MuchMetal shows us how with this neat class.

To get details of a particular MP3, firstly, set the Filename property. Then check that the isActive property is set to True, indicating you have referenced a valid MP3 file. Next, read the appropriate properties, such as Title, Artist, Album and Genre.

You can also change any of these properties, then save 慹m back to the original file with the SaveTag method.

To learn how to play MP3 files from within Visual Basic, check out this neat tutorial from our partner in code, VBWeb.co.uk.

Sample Code

Dim MP3 As New clsID3
MP3.Filename = "c:\ChrisRea.mp3"

If MP3.isActive = True Then
`Get ID3 information about MP3
MsgBox "MP3 Info:" & vbCrLf & vbCrLf & _
"Title:" & vbTab & MP3.Title & vbCrLf & _
"Artist:" & vbTab & MP3.Artist & vbCrLf & _
"Album:" & vbTab & MP3.Album & vbCrLf & _
"Year:" & vbTab & MP3.Year & vbCrLf & _
"Genre:" & vbTab & MP3.Genre & vbCrLf & _
"Comment:" & vbTab & MP3.Comment

`Change the ID3 information
MP3.Artist = "New Artist 2"
MP3.Title = "New Title 2"
MP3.Album = "Some Album 2"
MP3.Comment = "Created using clsID3 2"
MP3.Year = "2000"
MP3.Genre = 54

MP3.SaveTag `Saves the new ID3 information

Else `Error opening MP3 file
MsgBox "Invalid MP3 file"
End If

这个class不错,可以获得mp3文件的information,能获得的项目就如同我们在winamp中看到的文件information一样。上面的例子,在运行的时候要先下载这个class,然后添加到程序中,就可以了。
评论:0, 阅读:18842, 日期:2000-03-17 [网络] 获得HTML页面的全部连接
评论:0, 阅读:16800, 日期:2000-04-13 [数据库] 范例-如何在 MSFlexGrid 中输入资料
评论:0, 阅读:13357, 日期:2000-03-12 [界面] 自己动手做一个进程杆控件
评论:0, 阅读:17111, 日期:2001-01-22 [界面] 自制进度条
暂时没有这代码的摘要
评论:0, 阅读:16704, 日期:2000-03-12 [日期] 自制绝对时间的 Timer 函数
评论:0, 阅读:16481, 日期:2000-05-16 [界面] 自制安装程序的界面(自己的软件用自己的)
评论:0, 阅读:16470, 日期:2000-11-06 [其他] 能精确到毫秒的timer控件(附源代码)
能精确到毫秒的timer控件(附源代码)
评论:0, 阅读:13394, 日期:2000-11-21 [多媒体] 能够得到特定的目录路径
这段代码能够得到特定的目录路径。
评论:0, 阅读:20362, 日期:2000-05-11 [图形] 背景贴图测试