Microsoft KB Archive/237816

= BUG: MSFLEXGRID Prints as Black Box After Installing Service Pack 3 =

Article ID: 237816

Article Last Modified on 5/12/2003

-

APPLIES TO

 Microsoft Visual Basic 6.0 Professional Edition, when used with:  Microsoft Windows NT 4.0

 Microsoft Windows 2000 Standard Edition  Microsoft Visual Basic 6.0 Enterprise Edition, when used with:  Microsoft Windows NT 4.0

 Microsoft Windows 2000 Standard Edition</li></ul> </li> Microsoft Visual Studio 6.0 Service Pack 3</li> Microsoft Visual Studio 6.0 Service Pack 5</li></ul>

-

<div class="notice_section">

This article was previously published under Q237816

<div class="symptoms_section">

SYMPTOMS
When you use the PrintForm method of the Form object, if the Form contains a Microsoft FlexGrid (MSFlexGrid) control, the MSFlexGrid control prints as a black box. This only occurs on Windows NT and Windows 2000. The control prints correctly on Windows 95 and Windows 98.

<div class="resolution_section">

RESOLUTION
To work around this problem, use the Microsoft Hierarchical FlexGrid (MSHFlexGrid) control, which appears as Microsoft Hierarchical FlexGrid Control (SP3) (OLEDB) in the Components dialog box. Switching to this control should not require coding changes.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in Visual Basic 6.0 running in Visual Studio 6.0 Service Pack 3 (SP3) or SP5 under Windows NT 4.0 and Windows 2000.

<div class="moreinformation_section">

Steps to Reproduce Behavior
<ol> Start a new Standard EXE project. Form1 is created by default.</li> On the Project menu, click Components.</li> In the Components dialog box, click Microsoft FlexGrid Control 6.0 (SP3). The name of the control is Msflexgrid.ocx. Click OK. Notice that a new icon is added to your toolbox for the FlexGrid control.</li> Double-click the FlexGrid icon in the toolbox to add the control to Form1.</li>  In the General Declarations section of Form1, add the following code: Private Sub Form_Load Me.PrintForm End Sub </li> Make sure that you have a default printer set up, and then press the F5 key to run the project. On the printout, notice that a solid black box appears where the FlexGrid should appear.</li></ol>

Keywords: kbbug kbnofix kbprint KB237816

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.