The information in this article applies to:
SYMPTOMSWhen a modal form is displayed from an ActiveX EXE component called from VBA, the Office application that made the call does not repaint correctly while the dialog is displayed. CAUSE
When making an out-going call to an out-of-process COM server, the main thread of the Office application is placed in an RPC thread loop waiting for a response from the server. Because the server is waiting for a modal form to be closed, the main thread of the Office application stops responding. During that time, certain window messages are allowed to pass back to the caller, but due to a limitation with the message filter used by most Office applications, WM_PAINT messages are not getting sent back to the main window for the Office application. The result is that the application does not repaint while the modal form is displayed. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATIONTo reproduce the behavior you need to build an ActiveX EXE component that displays a modal form. You also need a VBA-enabled Office application. This sample uses Microsoft Visual Basic to build the out-of-process server component, and Microsoft Excel to act as the client. Please note, however, that the problem is not specific to Visual Basic-built components, and is also not limited to Excel. Steps to Reproduce Behavior
NOTE: Do not switch between applications while running this test. It is possible to get Excel in front of the modal dialog, thereby preventing you from closing the dialog and returning to Excel. If this happens, press the CTRL+ALT+DELETE key combination to bring up the Task Manager. Find RepaintTest.EXE in the Process list and end the task. Additional query words: painting redraw IMessageFilter
Keywords : kbAccess kbActiveX kbAutomation kbExcel kbOutlook kbProject KbVBA kbVBp500 kbVBp600 kbVC kbPowerPt kbWord kbGrpDSO kbExcel97 kbDSupport kbWord97 kbexcel2000 kboutlook2000 kbword2000 |
Last Reviewed: October 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |