Help and Support
 

powered byLive Search

FIX: "Unexpected Error" Message When Loading a GIF

Retired KB ArticleThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Article ID:194414
Last Review:March 18, 2005
Revision:2.1
This article was previously published under Q194414

SYMPTOMS

Loading a GIF file that does not specifically contain an Image Object into Visual Basic 5.0 (for example, through the PictureBox control), generates the run-time error 50003:
"Unexpected Error"
It is important to note that this error is somewhat of a "catch-all" error that can be generated under other circumstances completely unrelated to the use of GIF files. The purpose of this article is to provide details regarding one particular set of circumstances where this error may arise.

Back to the top

CAUSE

Visual Basic 5.0 does not support GIFs that include images that are contained within Application Blocks. The Image Object must be included in the GIF as a separate Image Object.

Back to the top

RESOLUTION

Use one of the following methods to work around this problem:
Use Error Handling to trap for and handle appropriately error 50003 (unexpected error) in your Visual Basic application. For more information, search for the Help topic "Designing an Error Handler" in the Microsoft Visual Basic 6.0 Online Documentation.
Ensure that images contained within a GIF file are included specifically as Image Objects and not contained within Application Blocks.

Back to the top

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

This problem was corrected in Visual Basic version 6.0 for Windows.

Back to the top

MORE INFORMATION

As mentioned in the "Cause" section of this article, Visual Basic 5.0 does not support GIFs that include images which are contained within Application Blocks. The Image Object must be included in the GIF as a separate Image Object. This functionality currently exists in Microsoft Internet Explorer 4.0 as well as Visual Basic 6.0.

Back to the top


APPLIES TO
Microsoft Visual Basic 5.0 Learning Edition
Microsoft Visual Basic 5.0 Professional Edition
Microsoft Visual Basic 5.0 Enterprise Edition

Back to the top

Keywords: 
kbbug kberrmsg kbfix kbvbp600fix KB194414

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by E-mail, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.