OFFXP: Custom MouseIcon Property for FM20 Control Can Leak GDI Handles

Article translations Article translations
Article ID: 822768 - View products that this article applies to.
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page

SYMPTOMS

When you use Microsoft Forms 2.0 Controls (FM20) with Office XP or with another Microsoft Visual Basic for Applications (VBA) host application, you may notice a leak in the Graphics Device Interface (GDI) handles if you use the MouseIcon property to change the mouse cursor for a control to a custom cursor. When the property is updated with a new icon, or the control is reloaded as a user form, or a document is closed and then reopened, a pair of handles can be leaked for the process. The handles are not reclaimed until the host application shuts down. If the application is left running for a long time, the system may run low on resources, and you may notice GDI draw problems or low memory errors as they interact with the host application. For Microsoft Office applications, this typically occurs when a document that contains an FM20 control with a custom cursor is opened and closed repeatedly.

CAUSE

When you set the MouseIcon property to a custom cursor, FM20 converts the StdPicture object that is passed by the caller to internal bitmaps (one for the image, another for the icon mask). As these images are applied to form the mouse cursor during a focus or during a mouse event, one or both handles may be leaked.

RESOLUTION

Service Pack Information

This problem is corrected in Office XP Service Pack 3.To resolve this problem, obtain the latest service pack for Microsoft Office XP. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
307841 How to obtain the latest Office XP Service Pack

Hotfix Information

How to Obtain the Hotfix

This issue is fixed in the Office XP Post-Service Pack 2: Hotfix Rollup Package July 3, 2003. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
822342 Availability of the Office XP Post-Service Pack 2 Hotfix Rollup Package: July 3, 2003

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. : This problem was first corrected in Office XP Service Pack 3.

Properties

Article ID: 822768 - Last Review: October 26, 2013 - Revision: 4.2
APPLIES TO
  • Microsoft Office XP Developer Edition
Keywords: 
kbnosurvey kbarchive kbqfe kbhotfixserver kbofficexppresp3fix kbfix KB822768

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com