try this
adapt as neededCode:Private Structure typMP3ID3 Public sTag As String Public sTitle As String Public sArtist As String Public sAlbum As String Public sYear As String Public sComment As String Public sGenre As String End Structure Dim m_udtMP3ID3 As typMP3ID3 Private Sub Form_Load() Dim strFilePath As String strFilePath = "d:\test.mp3" With m_udtMP3ID3 .sTag = Space(3) .sTitle = Space(30) .sArtist = Space(30) .sAlbum = Space(30) .sYear = Space(4) .sComment = Space(30) .sGenre = Space(1) End With FileOpen(1, strFilePath, OpenMode.Binary) FileGet(1, m_udtMP3ID3) FileClose(1) With m_udtMP3ID3 If .sTag = "TAG" Then MsgBox(.sAlbum & vbCrLf _ & .sArtist & vbCrLf _ & .sComment & vbCrLf _ & .sGenre & vbCrLf _ & .sTag & vbCrLf _ & .sTitle & vbCrLf _ & .sYear & vbCrLf) Else MsgBox(LCase(strFilePath) & vbCrLf _ & "NO ID3 TAG FOUND!") End If End With Me.Close() End Sub




Reply With Quote