Microsoft KB Archive/329646

= BUG: A Windows Forms control is not printed when you host the control in Internet Explorer =

Article ID: 329646

Article Last Modified on 6/22/2006

-

APPLIES TO


 * Microsoft Internet Explorer 5.5
 * Microsoft Visual Studio .NET 2002 Professional Edition

-



This article was previously published under Q329646



SYMPTOMS
When you host a Windows Forms control on a Web page in Internet Explorer, the control renders and displays properly. However, when you print or print preview the page, the control does not appear at all.

Note This problem does not occur with unmanaged ActiveX controls.



CAUSE
To print a form or a control, a .NET application renders the content to a bitmap and then prints the bitmap. However, when Internet Explorer tries to print an HTML page, it first renders the page to a metafile and then prints the metafile. This problem occurs in Internet Explorer because Graphics Device Interface (GDI) has some limitation in printing to a metafile device context.



STATUS
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 Problem
 Create a .NET Windows Form control.  Add the control in an HTML page with the  tag. For example:   Open the HTML page in Internet Explorer. Notice that you can see your control in Internet Explorer. Click Print Preview on the File menu. Notice that the control does not appear.</li> Click Print on the File menu. Notice that the printed document does not include the control.</li></ol>

<div class="references_section">