PRB: SetParent Does Not Change Standard Forms into Child Windows (253814)
The information in this article applies to:
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
This article was previously published under Q253814 SYMPTOMS
When you call the SetParent function to allow a standard form to become a child form of a multiple-document interface (MDI) application, many child windowing features do not work.
CAUSE
This problem occurs because, by design, a standard window cannot be completely altered at run time to mimic a child window.
RESOLUTION
To work around this problem, use a dynamic MDI application in place of the SetParent call. ActiveX controls can be dynamically loaded onto a form. An MDI child form can dynamically load an ActiveX control that takes over the entire client area of the window. For more information on this approach, see the "References" section.
REFERENCESFor additional information about how to dynamically add intrinsic and ActiveX controls, click the article number below
to view the article in the Microsoft Knowledge Base:
190670 HOWTO: Dynamically Add Controls to a Form with Visual Basic 6.0
For additional information about similar problems using the SetParent function to manipulate ActiveX components, click the article number below to view the article in the Microsoft Knowledge Base:
289498 PRB: Form Cannot Get Focus After You Use SetParent to Move Controls to Another Form
Modification Type: | Major | Last Reviewed: | 7/15/2002 |
---|
Keywords: | kbAPI kbDLL kbDSupport kbprb KB253814 |
---|
|