Got one more for you. Badly need help to figure this one out.
The problem appears when I want to read a custom tag. In this case I tested with the tag "Keywords" that also have a list-style I want to use in my tag. I get the error under, in red. The problem appears that the tags I want to use is not included as a member of ComObject. Posted all of my code, so you can get a better understanding. The code I got a problem with is marked in blue.
System.MissingMemberException: Public member 'Keywords' on type '_ComObject' not found.
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
at MC_VBNETPlugin_Template.MainInterface.Button4_Click(Object sender, EventArgs e) in D:\mc_vbnetplugintemplate\VB_NetPluginSoloution\VB_NetPluginProject\MainInterface.vb:line 120
'Variable for Artist which is shown in textbox
Public changeText As String
'Index number of track in listbox
Public indexNumber As Integer
Public playlist As MediaJukebox.IMJCurPlaylistAutomation
'Get the file from the current position in the playlist
Public track As MediaJukebox.MJFileAutomation
Private Sub bt_getPlayList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_getPlayList.Click
'Clearing Listbox before filling with tracks from "playing now"
lb_playlist.Items.Clear()
'Making a counter variable
Dim counter As Integer
'Get the current playing now playlist
playlist = mediaCenterRef.GetCurPlaylist()
'Making a list which is set to nothing
Dim listOfTrackNames As String = ""
'Making a variable for complete trackinfo for each song
Dim listData As String
'Variable for tags
Dim trackName As String
'Variable for tags
Dim trackArtist As String
'Iterate through all the files in the playlist
For counter = 0 To (playlist.GetNumberFiles() - 1)
'Get file from counters position
track = playlist.GetFile(counter)
'Putting tag from Name in trackName variable
trackName = track.Name
'Putting tag from Artist in trackName variable
trackArtist = track.Artist
'Making the complete string from the tags
listData = trackArtist + " / " + trackName
'Writing the strings one by one, with each "For" pass
lb_playlist.Items.Add(listData)
Next
End Sub
Private Sub lb_playlist_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lb_playlist.SelectedIndexChanged
'Getting track from selected line in listbox
track = playlist.GetFile(lb_playlist.SelectedIndex + 1)
'Putting Artist tag in changeText variable
changeText = track.Artist
'Putting changeText in the textbox
TextBox1.Text = changeText
End Sub
Private Sub bt_updateArtist_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_updateArtist.Click
'Putting text in textbox to the variable
changeText = TextBox1.Text
'Choosing which field to update
Dim tagField As String = "Artist"
'Updating tag in library (field, value)
track.Set(tagField, changeText)
End Sub
Private Sub bt_getTestTag_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_getTestTag.Click
'Getting track from selected line in listbox
track = playlist.GetFile(lb_playlist.SelectedIndex + 1)
'Trying to list the contents of the tag "Keywords"
'but failing miserably!!!!!!!!!!!!
MessageBox.Show(track.Keywords)
End Sub
End Class