G
Guest
I am getting the subject error message when an animated gif is displayed in a
picture box. I did not create the gif and in general what will be displayed
in that box is NOT under my control. (Other animated gifs jpegs etc display
fine.)
The ugly thing is that other Vista programs, namely Windows Mail and IE7,
display the gif just fine.
Clearly they are doing something to protect themselves that I'm not doing. I
just:
If picturebox.image isnot nothing then
picturebox.image.dispose
picturebox.image = nothing
end if
dim newImage as image = loadImageThroughAllTheMagicOfMyProgram
picturebox.image = newImage
QUESTION: What do I do to check and tweak newImage to make sure that it
isn't somehow slightly broken?
QUESTION: Is the dispose code necessary? The system should not dispose the
picturebox.image because it doesn't know what we want to do with it. If
someone knows that if the reference count on an image not otherwise stored
runs to zero the image is disposed, then I'd be glad to hear of it.
Regards,
Al Christoph
Senior Consultant
Three Bears Software, LLC
just right software @ just right prices @ 3bears.biz
Microsoft Certified Partner (ISV)
Coming soon: Windows Mail for Vista.
picture box. I did not create the gif and in general what will be displayed
in that box is NOT under my control. (Other animated gifs jpegs etc display
fine.)
The ugly thing is that other Vista programs, namely Windows Mail and IE7,
display the gif just fine.
Clearly they are doing something to protect themselves that I'm not doing. I
just:
If picturebox.image isnot nothing then
picturebox.image.dispose
picturebox.image = nothing
end if
dim newImage as image = loadImageThroughAllTheMagicOfMyProgram
picturebox.image = newImage
QUESTION: What do I do to check and tweak newImage to make sure that it
isn't somehow slightly broken?
QUESTION: Is the dispose code necessary? The system should not dispose the
picturebox.image because it doesn't know what we want to do with it. If
someone knows that if the reference count on an image not otherwise stored
runs to zero the image is disposed, then I'd be glad to hear of it.
Regards,
Al Christoph
Senior Consultant
Three Bears Software, LLC
just right software @ just right prices @ 3bears.biz
Microsoft Certified Partner (ISV)
Coming soon: Windows Mail for Vista.