How to set background image
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
Related Article: set background Image
is a C# discussion thread by bhagawatshinde that has 4 replies and was last updated 1 year ago.
yousafc#
Junior Poster in Training
98 posts since Feb 2011
Reputation Points: 10
Solved Threads: 2
Skill Endorsements: 0
You can use "this" keyword to set the background image property.
this means the form you currently are.
this.BackgroundImage = "your image";
Mitja Bonca
Posting Maven
2,561 posts since May 2009
Reputation Points: 642
Solved Threads: 486
Skill Endorsements: 13
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.
Mitja Bonca
Posting Maven
2,561 posts since May 2009
Reputation Points: 642
Solved Threads: 486
Skill Endorsements: 13
But Mitja I want set back ground image of media player not a form
yousafc#
Junior Poster in Training
98 posts since Feb 2011
Reputation Points: 10
Solved Threads: 2
Skill Endorsements: 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!
nick.crane
Nearly a Posting Virtuoso
1,230 posts since Feb 2010
Reputation Points: 375
Solved Threads: 188
Skill Endorsements: 3