0

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

3
Contributors
4
Replies
6
Views
6 Years
Discussion Span
Last Post by nick.crane
0

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

this.BackgroundImage = "your image";
0

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.

0

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

0

"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!

Edited by nick.crane: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.