please help me to solve this error?

Posted by Sudheep.grandhe under C# on 11/3/2011 | Points: 10 | Views : 951 | Status : [Member] | Replies : 1
Hi,

I want to create a background image for mdi form.I wrote the following code it shows some error.can you please help to rectify those errors.I am underlying the error part.please do the needful.


Error:-Value of 'null' is not valid for 'stream'.
public WelcomePage()
{
InitializeComponent();
foreach (Control c in this.Controls)
{
if (c is MdiClient)
{
c.BackgroundImage = Image.FromStream(this .GetType ().Assembly .GetManifestResourceStream ("F:/ImageImpactServices/ImageImpactServices/marsweb.imageimpacts/marsweb.imageimpacts/1320220637_background.png"));
}
}
}

Best,
Sudheep.



Responses

Posted by: Naraayanan on: 2/14/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Check this link
http://social.msdn.microsoft.com/Forums/en/winforms/thread/59a0b863-60bc-4ffa-8350-01793d93727a

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response