vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
sevAniGif - als kostenlose Vollversion auf unserer vb@rchiv CD Vol.5  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

Suche Visual-Basic Code
Re: WMP-Informationen Auslesen 
Autor: L.B.
Datum: 19.08.02 13:06

Private Path$
Private Sub cmdLoad_Click()
Dim T As TagInfo
cdLoad.ShowOpen
Path = cdLoad.FileName
If GET_ID3V1TAG(Path, T) Then
txtAlbum.Text = T.album
txtArtist.Text = T.artist
txtComment.Text = T.comment
txtGenere.Text = T.genre
txtTitle.Text = T.Songname
txtYear.Text = T.year

Else
txtAlbum.Text = ""
txtArtist.Text = ""
txtComment.Text = ""
txtGenere.Text = ""
txtTitle.Text = ""
txtYear.Text = ""
MsgBox "Kein ID3v1 Tag gefunden", vbInformation, "Info"
End If
End Sub

Private Sub cmdSave_Click()
Dim T As TagInfo
T.album = txtAlbum.Text
T.artist = txtArtist.Text
T.comment = txtComment.Text
T.genre = txtGenere.Text
T.Songname = txtTitle.Text
T.year = txtYear.Text
If Not PUT_ID3V1TAG(Path, T) Then MsgBox "Fehler: Konnte keinen " &_
"ID3v2 Tag schreiben", vbCritical, "Fehler"
End Sub

Private Sub Form_Load()
cdLoad.Filter = "MP3-Dateien (*.mp3)|*.mp3"
End Sub

Option Explicit

Public 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

Public Path$, WINAMPPATH$

Public Function GET_ID3V1TAG(FilePath$, TAG As TagInfo) As Boolean
Dim FNum%, fso As New FileSystemObject
On Error GoTo ERRORS

If Not fso.FileExists(FilePath) Then
GET_ID3V1TAG = False
Exit Function
End If
With TAG
FNum = FreeFile
Open FilePath For Binary As #FNum
Get #FNum, LOF(FNum) - 127, .TAG
If .TAG <> "TAG" Then
GET_ID3V1TAG = False
Close #FNum
Exit Function
End If
Get #FNum, , .Songname
Get #FNum, , .artist
Get #FNum, , .album
Get #FNum, , .year
Get #FNum, , .comment
Get #FNum, , .genre
Close #FNum
GET_ID3V1TAG = True
End With

Exit Function
ERRORS:
GET_ID3V1TAG = False
Close #FNum
End Function

Public Function PUT_ID3V1TAG(FilePath$, TAG As TagInfo) As Boolean
Dim FNum%, TPos&
On Error GoTo ERRORS

With TAG
FNum = FreeFile
Open FilePath For Binary As #FNum
TPos = LOF(FNum)
Get #FNum, TPos - 127, .TAG
If .TAG = "TAG" Then TPos = TPos - 127
.TAG = "TAG"
Put #FNum, TPos, TAG
Close #FNum
PUT_ID3V1TAG = True
End With

Exit Function
ERRORS:
PUT_ID3V1TAG = False
End Function
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
WMP-Informationen Auslesen99Fivedark18.08.02 16:23
Re: WMP-Informationen Auslesen72L.B.19.08.02 13:06
Re: WMP-Informationen Auslesen69Fivedark19.08.02 16:12

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel