i use this code under the CurrentMediaItemAvailable for windows media player but it will not show the title or the name ,
but it will show some media name , but some media file will not !

Private Sub AxWindowsMediaPlayer1_CurrentMediaItemAvailable(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_CurrentMediaItemAvailableEvent) Handles AxWindowsMediaPlayer1.CurrentMediaItemAvailable
        Label1.Text = AxWindowsMediaPlayer1.currentMedia.name + AxWindowsMediaPlayer1.currentMedia.getItemInfo("Artist") + " - " + AxWindowsMediaPlayer1.currentMedia.getItemInfo("Title")
    End Sub

Recommended Answers

All 2 Replies

Is your audio file has those media info actually. Try to open the file in foobar and see. If the file contain media info then post it here.

even media file has no info at all
it must show the name file or not ?
i want only to show the name of that media
like media name is one.mp3
so print the name in label1.text

is this correct to put the code in CurrentMediaItemAvailable Event ?

ps : i forgot to tell that when i put the code in a simple command button and i click it , it will show the name of file
but that's not right
but not in CurrentMediaItemAvailable Event :o so weird ? !

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.