Hello All
I just made a simple media player in c sharp.My code is

axWindowsMediaPlayer1.ContainingControl.BackgroundImage = Properties.Resources.Image1 ;

But it is not working..................Please tell me.
Thanks Advance

Recommended Answers

All 4 Replies

You can use "this" keyword to set the background image property.
this means the form you currently are.

this.BackgroundImage = "your image";

If you want to set the image on some other form, its not good to set it from some other form (over classes). Better to create a new instance of that form, and while in Constructor set it there, using my upper code.

But Mitja I want set back ground image of media player not a form

"axWindowsMediaPlayer1.ContainingControl.BackgroundImage" is the background of the container of the MediaPlayer object!
I am not sure that you can do what you want with the MediaPlayer SDK.

This link shows why I think this.
All the background changers are modifying the registry!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.