hi!
i am trying to change the title of a media player object:

Private Sub stam()
Dim wm As New WindowsMediaPlayer
wm.URL = "C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Stories (Highway Blues).mpg"
MsgBox wm.currentPlaylist.getItemInfo("title")
wm.setItemInfo("title" ,"hello")
End Sub

the getitemifo works well, but not the setiteminfo
i get a messege: "compiler error expected ="
why?

Recommended Answers

All 4 Replies

Isn't setItemInfo applicable only to something like currentPlaylist or currentMedia?

About the error, try removing parenthesis when calling setItemInfo.

Is that VB6, BTW?

it's VBA
what do you mean about removing parenthesis?
i tried adding currentplayerlist...
thanx a million

Cool

what do you mean about removing parenthesis?

I was talkin about to not use brackets in wm.setItemInfo("title" ,"hello").

iPrivate Sub stam()
Dim wm As New WindowsMediaPlayer
wm.URL = "C:\Documents and Settings\All Users\Documents\My Music\Sample Music\New Stories (Highway Blues).mpg"
MsgBox wm.currentPlaylist.getItemInfo("title")
wm.setItemInfo("title" ,"hello")
End Sub

why?

can i ask what is the use of this?

and can i ask how to create a media player in the vb6 or can i borrow a sample of ur project coz i want to learn how to make it and how to upload a music in my project

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.