Question

i'm making a mediaplayer concerning the COM-library "WMPLib" The program consisted of 1 form. I make use of the WMPPlayState Enumerable, and has run smooth until now with a playlist and everything.

But now i decided to split the program into 2 forms (Winamp-idea):

Form1 = Player

Form2 = Playlist

Of course i rearranged some code to make it work. This is what i get from the listBox in form2 (trackURL has a public modifier):

private void listTracks_DoubleClick(object sender, EventArgs e)
{
    trackURL = listTracks.SelectedItem.ToString();
    playerForm.TEST(trackURL);
}

It calls the TEST(string trackURL) method in form1, which holds this:

public void TEST(string trackURL)
{
    player.URL = trackURL;
    player.controls.play();
}

The problem is that, apparently, the playStateChange is not triggered. Because of this, none of my controls work since everything goes through the playStateChange Enumerator. The song of choice from the playlist is being played as meant to. But without any control over it. Even volumecontrol doesn't work.

Any help is appreciated.

Greetings, Danny

Was it helpful?

Solution

I finally worked it out.

I don't know what exactly happened, but i re-typed some code whereby i renamed the name "TEST" to "Play"... and suddenly it worked.

The name of a method shouldn't be the reason for something to fail, but for some strange reason, this time it was :s

Perhaps something got re-coded in the background why it's now almost impossible to make it NOT work :P

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top