Sådan her læser man fra en mp3, skulle mene man med lidt snilde kunne skrive til den på samme måde..
(rippet fra
http://www.techiwarehouse.com/cms/articles.php?cat=35)Men der findes selvfølgeligt meget mere.. søg på google... taggene hedder ID3, og ligger i de sidste 128 bytes i en mp3.. søg på noget lignende
http://www.google.dk/search?q=%22how+to%22+change+%2BID3+%2Bvba&hl=da&lr=&start=0&sa=N
Option Explicit
Private Type TagInfo
Tag As String * 3
Songname As String * 30
artist As String * 30
album As String * 30
year As String * 4
comment As String * 30
genre As String * 1
End Type
Dim FileName As String
Dim CurrentTag As TagInfo
Private Sub Form1_Load()
Dim temp As String
On Error Resume Next
FileName = App.Path & "\\myMP3.mp3"
Open FileName For Binary As #1
With CurrentTag
Get #1, FileLen(FileName) - 127, .Tag
If Not .Tag = "TAG" Then
label8.Caption = "No tag"
Close #1
Exit Sub
End If
Get #1, , .Songname
Get #1, , .artist
Get #1, , .album
Get #1, , .year
Get #1, , .comment
Get #1, , .genre
Close #1
txtTitle = RTrim(.Songname)
txtArtist = RTrim(.artist)
txtAlbum = RTrim(.album)
txtYear = RTrim(.year)
txtComment = RTrim(.comment)
Temp = RTrim(.genre)
txtGenreCode = Asc(Temp)
Combo1.ListIndex = CInt(txtGenreCode) - 1
End With
End Sub
Med venlig hilsen
/Jokke Jensen
www.jj-multimediedesign.dk