FIX: The Load event does not execute when you use the ShowDialog method to show a form that contains an ActiveX control (318386)
The information in this article applies to:
- Microsoft Visual Studio .NET (2002), Professional Edition
This article was previously published under Q318386 SYMPTOMS When you show a form by using the ShowDialog method, the Load event of that form does not execute. RESOLUTION The following are several potential workarounds or options
that you can use to resolve this problem:
- Override the window procedure (WndProc) of the form and manually call the Load event procedure.
- Use a non-ActiveX control whenever possible. For example,
rather than use the Microsoft Windows Common Dialog control, as in the following sample, use the equivalent controls
that are provided with Visual Studio .NET, such as OpenFileDialog, SaveFileDialog, or PrintDialog.
- Use the Show method instead of the ShowDialog method.
- Determine if you can use an event procedure other than the Load event procedure in your application.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
This bug was corrected in Visual Studio .NET 2003.
Modification Type: | Minor | Last Reviewed: | 1/19/2006 |
---|
Keywords: | kbvs2005doesnotapply kbvs2005swept kbtshoot kbvs2002sp1sweep kbfix kbbug KB318386 kbAudDeveloper |
---|
|