Need help controlling Windows Media Player Activex component

Ok, I am using BCB 6 and have imported a windows media player activex component to my Borland program.

I created a new application and dropped the WMP activeX component on the form.

I've read all over the place and can't figure out how to access that windows media player component.

I've read up on MSDN and see all the great methods and properties such as, stop, pause, etc etc.. But silly me can't figure out how to address the wmp comonent

Obviously simply trying to call it using the components name doesnt work, such as WindowsMediaPlayer1->play

Thanks for any help,


  • Hi! I just installed the WMP ActiveX component and added it to a form and by just typing:
    all the methods and properties appear and the following code worked flawlessly:
    void __fastcall TForm1::Button2Click(TObject *Sender)
    WindowsMediaPlayer1->URL = "MySong.mp3";
    catch(Exception &e)
    ShowMessage("Error: " + e.Message);
    If this doesn't work for you maybe the component isn't installed properly (via Component->Import ActiveX Control...)?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion