Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 306719 - Last Review: February 23, 2007 - Revision: 4.2
BUG: Using the WebBrowser control on Windows.Forms.Form with the Opacity set to "< 1" causes some computers to fail
This article was previously published under Q306719
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.
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.
It is recommended that you do not use transparency with the
Windows.Forms.Form namespace that is hosting the WebBrowser control.
Microsoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
To create a Visual Basic .NET application that uses the
Microsoft WebBrowser control:
- In Visual Basic .NET, create a new Windows application
project. Form1 is created by default.
- 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.
- Use the toolbox and add a WebBrowser control to Form1 to
add the AxWebBrowser1 control to the Form1 class.
- 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.
For more information on Microsoft.NET Development, please
see the following Web sites:
APPLIES TO
- Microsoft Visual Basic .NET 2003 Standard Edition
- Microsoft Visual Basic .NET 2002 Standard Edition
- Microsoft .NET Framework 1.1
- Microsoft .NET Framework 1.0
| kbbug kbreadme kbpending kbvs2002sp1sweep KB306719 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate