Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...