But, I reduced it to this:
VB Code:
Private Sub Form_Load() Dim tagData As String * 128 vData = "D:\Alex\Mp3\Muziek\Cornershop - Brimful of Asha.mp3" If Len(Dir(vData)) = 0 Then MsgBox "Error, file not found": Exit Sub Else If UCase(Right(vData, 4)) <> ".MP3" Then MsgBox "Error, not an Mp3 file": Exit Sub fileNum = FreeFile filePos = FileLen(vData) - 127 If filePos > 0 Then Open vData For Binary As #fileNum Get #fileNum, filePos, tagData Close #fileNum If Left(tagData, 3) <> "TAG" Then MsgBox "Error, tag not located": Exit Sub mvarTitle = Replace(Trim(Mid(tagData, 4, 30)), Chr(0), "") mvarArtist = Replace(Trim(Mid(tagData, 34, 30)), Chr(0), "") mvarAlbum = Replace(Trim(Mid(tagData, 64, 30)), Chr(0), "") mvarYear = Replace(Trim(Mid(tagData, 94, 4)), Chr(0), "") mvarComment = Replace(Trim(Mid(tagData, 98, 30)), Chr(0), "") mvarGenre = Asc(Mid(tagData, 128, 1)) Else MsgBox "Error, file too short to be tagged Mp3-file": Exit Sub End If End If Text1 = "Title " & mvarTitle & vbCrLf Text1 = Text1 & "Artist " & mvarArtist & vbCrLf Text1 = Text1 & "Album " & mvarAlbum & vbCrLf Text1 = Text1 & "Year " & mvarYear & vbCrLf Text1 = Text1 & "Comment " & mvarComment & vbCrLf Text1 = Text1 & "Genre " & mvarGenre End Sub




Reply With Quote