whosyodaddy Posted March 18, 2004 Posted March 18, 2004 Hello. I uploaded an image inside my project. Whenever form1 loads i want the backround image to be the image i uploaded. Here is my code (in form1load)but it doesn't work: Dim Form As Form1 Dim Back As Image Back = Image.FromStream(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("SRC_Tournament_Randomizer.SRC_Logo.gif")) Form.BackgroundImage() = Back I get an error as so: "An unhandled exception of type 'System.NullReferenceException' occurred in SRC Tournament Randomizer.exe Additional information: Object reference not set to an instance of an object." Can somebody tell me why i'm getting this error? Thanks. Quote
Administrators PlausiblyDamp Posted March 18, 2004 Administrators Posted March 18, 2004 Have you checked the Rootnamespac for your application is correct? Is the image's buld option set as an embedded resource> http://www.xtremedotnettalk.com/showthread.php?t=83574 may be of some help Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
whosyodaddy Posted March 19, 2004 Author Posted March 19, 2004 Yes, the rootspacename is correct and embedded resource is correct. I already did this, sorry i didn't mention i had them. Any other ideas why it's not working?- Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.