What does this error mean?

bonedoc
05-25-2006, 12:20 PM
I get this error every now and then, but I do not know what it means, or how to fix it. Can anyone explain?

shaul_ahuva
05-25-2006, 02:08 PM
Well, it's a NullReferenceException so your code is attempting to work with a null reference (an object reference not pointing to any object).

Going by your code, either PicBox or PicBox.Image is null (Nothing). You could set conditional breakpoint to break when either becomes null.

bonedoc
05-25-2006, 02:36 PM
Well, it's a NullReferenceException so your code is attempting to work with a null reference (an object reference not pointing to any object).

Going by your code, either PicBox or PicBox.Image is null (Nothing). You could set conditional breakpoint to break when either becomes null.

What I am trying to do is delete the old picture and replace it with the new and save it under the same path. Here is my problem:

1. I have to dispose of the image in the picture box before it gets deleted, because it won't let me delete the picture while it is in use.
2. I created the tempimage.dispose to get rid of it. This lets me delete it. But, I can't save its path because the picture that was in the picturebox is not there now.

Is there a way that I can take the image and replace it with a new one? My image path needs to remain the same. Right now, I am trying to delete the image and then save the new one with the same path, but it is not working. Thanks for your help!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum