Windows Media Player

Ok. I have a windows media player control on my form. I need to know how to make it play a wav file that is on my desktop. Can someone help me please.


Answer this question

Windows Media Player

  • UtsavV

    Ok. I understand the first part, and got that down. But what I dont understand is how to make sure the media player doesnt start when the form loads. Because it start automatically. How do I prevent that from happening.


  • Alexander-XeNtR

    Why would it do that, unless you tell it to


  • AJ_101

    myWindowsMediaPlayer.URL = myWavfileURL;
    myWindowsMediaPlayer.Ctlcontrols.play();

  • Anthony King

    Well, you'd need to check for time passed, or let the user press a button that says 'play music', before you call the play method.
  • MChamber

    Well how do I keep the player from starting on the form_load event

  • jpmartop

    Not sure why it would play automatically, but this is how I disabled that:

    windowsMediaPlayer.settings.autoStart = false;


  • Windows Media Player