Article ID: 312120 - View products that this article applies to.
This article was previously published under Q312120
When you place an ActiveX control that was created in Visual Basic 6.0 or Visual C++ 6.0 on a form in a Visual Studio .NET Windows application, the control may disappear from the form in the design view. The control disappears when you use the Properties window to set the value of a form property, such as ShowInTaskBar.
If you set any property of the form (such as ShowInTaskBar), the form's handle is recreated. Some ActiveX controls hide their windows when the parent's Hwnd gets a WM_DESTROY message. This sets the control's STATE_VISIBLE property to false inside the property's state bits. When the form's handle is recreated, the control's handle is not recreated because the control's STATE_VISIBLE property is set to false.
To work around the problem, you can set the properties in the Form_Load event instead of in the Properties window.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Steps to Reproduce the Behavior
Article ID: 312120 - Last Review: January 25, 2006 - Revision: 3.4
Contact us for more help