BUG: Using the WebBrowser control on Windows.Forms.Form with the Opacity set to "< 1" causes some computers to fail (306719)



The information in this article applies to:

  • Microsoft Visual Basic .NET (2003)
  • Microsoft Visual Basic .NET (2002)
  • Microsoft .NET Framework 1.1
  • Microsoft .NET Framework 1.0

This article was previously published under Q306719

SYMPTOMS

In Visual Basic .NET, developers can use the Form.Opacity property of Windows.Forms.Form to enable the level of transparency for the form and its controls. Using the Microsoft WebBrowser control (Shdocvw.dll) on a Windows.Forms.Form namespace with the Opacity property set to <1 causes some computers to fail.

CAUSE

This problem occurs because of limitations in some video card drivers.

NOTE: The Opacity property of Windows.Forms.Form differs from transparency that is provided by the TransparencyKey property of Windows.Forms.Form.

RESOLUTION

It is recommended that you do not use transparency with the Windows.Forms.Form namespace that is hosting the WebBrowser control.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

To create a Visual Basic .NET application that uses the Microsoft WebBrowser control:
  1. In Visual Basic .NET, create a new Windows application project. Form1 is created by default.
  2. On the Tools menu, click Add/Remove ToolBox Items. In the Customize ToolBox dialog box, on the COM Components tab, add a reference to Microsoft Web Browser. Click OK to add the WebBrowser control to the Windows Forms toolbox.
  3. Use the toolbox and add a WebBrowser control to Form1 to add the AxWebBrowser1 control to the Form1 class.
  4. On the View menu, click Properties Window, and then change the Form1.Opacity property to less than 100 percent.
NOTE: When the Opacity property is set to a value less than 100 percent (1.00), the entire form, including borders and its controls, is made more transparent. Setting this property to a value of 0 percent (0.00) makes the form completely invisible.

REFERENCES

For more information on Microsoft.NET Development, please see the following Web sites:

Modification Type:MajorLast Reviewed:4/4/2006
Keywords:kbvs2002sp1sweep kbbug kbpending kbreadme KB306719