BUG: Resource Leak Occurs When You Display WMF Files in a PictureBox (257523)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q257523 SYMPTOMS
System and Graphical Device Interface (GDI) resources are not freed when you use a PictureBox control in Visual Basic to view multiple Windows MetaFile (WMF) images. Other image formats, such as BMP, JPG, and GIF, do not experience any resource leaks.
CAUSE
The resource leak is actually caused by a problem in the operating system. The operating system fails to destroy brushes that it creates to "play" a metafile image. Therefore, any application that uses the same operating system functionality to draw metafiles will experience the same loss in resources.
RESOLUTION
Currently, there is no known fix for this problem. One potential workaround, however, is to avoid the WMF file format and instead use another picture format, such as BMP, JPG, or GIF.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 10/15/2002 |
---|
Keywords: | kbBrush kbBug kbDSupport KB257523 |
---|
|