Chnage backgrounf color of a form
-
Hi All I am very new to C#,and i have to set background color of my form, i am trying to do like Assembly myAssembly = Assembly.GetExecutingAssembly(); Stream testImage= myAssembly.GetManifestResourceStream("Test.jpg"); but here it crashing. can anybody help me out thanks in advance RYK
-
?? I don't know what you want, but if you want to change background color of a form, just do like this: MyForm myForm = new MyForm(); // Here is your form myForm.BackColor = System.Drawing.Color.Red; // Change the background color to red.
-
Use BackGroundImage Property of ur form!(Singl-Click on ur form, then press F4. and use BackGroundImage Property to set an image. :)
[]D @ []v[] []D @ []v[]
-
Use BackGroundImage Property of ur form!(Singl-Click on ur form, then press F4. and use BackGroundImage Property to set an image. :)
[]D @ []v[] []D @ []v[]
-
no MR.VC_RYK there is a property just arrange the properties in alpahbetical order and just below BackColor the BackgroundImage will be found........search and use it....
Padmanabhan
modified on Friday, May 29, 2009 4:25 AM
-
it is impossible...! i check it right now...when u select ur form, from the form properties(F4), Click on BackgroundImage, then use Import... and select ur image with ( *.gif, *.jpg, *.jpeg, *.bmp, *.wmf, *.png ) suffixes. I hope u see it! :thumbsup:
[]D @ []v[] []D @ []v[]
-
The BackgroundImage property has been a part of every control since .NET 1.0, so I am sure it exists in yours! Are you sure you have a form, not a console application? Can you open the designer view on it? If so, then check the properties are listed A-Z and that you aren't viewing the events. If really desparate, try using intellisense and check it programatically:
frmMine fm = new frmMine();
fm.BackgroundImage = @"C:\Pic.jpg";If this comes up with errors, then paste your code here, with the error message.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones
-
Hi All I am very new to C#,and i have to set background color of my form, i am trying to do like Assembly myAssembly = Assembly.GetExecutingAssembly(); Stream testImage= myAssembly.GetManifestResourceStream("Test.jpg"); but here it crashing. can anybody help me out thanks in advance RYK