Microsoft KB Archive/168155

= FIX: Crash When Resizing Column of Split DBGrid =

Article ID: 168155

Article Last Modified on 12/10/2003

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 5.0 Professional Edition

-



This article was previously published under Q168155



SYMPTOMS
When attempting to resize a column of a DBGrid that has been split using the Split method, your application crashes with an error such as:

PROJECT1.EXE - Application Error

The instruction at "0x019800F0" referenced memory at "0x9998F0D8".

The memory could not be "written".

-or-

PROJECT1.EXE

This program has performed an illegal operation and will be shut down.

If the problem persists, contact the program vendor.

PROJECT1 caused an invalid page fault in module at 0000:FFFFFFFF



CAUSE
DBGRID32.OCX version 5.00.3714 does not handle window ownership correctly when re-sizing columns.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in the version 5.00.3817 of DBGRID32.OCX that ships in Visual Studio Service Pack 1.

For additional information about the Visual Studio 97 Service Pack 1, please see the following article in the Microsoft Knowledge Base:

170365 INFO: Visual Studio 97 Service Packs - What, Where, and Why



Steps to Reproduce Behavior
 Start a new Standard EXE project. Add DBGrid to the project. Place an instance of DBGrid on the default form (DBGrid1 by default). Place a data control on the form (Data1 by default). Set the Database property of the data control to point at BIBLIO.MDB. Set the RecordSource property to Publishers.</li> Set the DBGrid DataSource property to Data1.</li>  Add the following code to the Form Load event: Private Sub Form_Load DBGrid1.Splits.Add (1) End Sub </li> Run the application.</li> Resize the first column header as small as possible.</li> Try resizing the first column header as small as possible again.</li></ol>

Keywords: kbbug kbfix kbvbp500sp2fix kbvs97sp1fix kbvs97sp2fix kbvbp500sp1fix KB168155

-

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

© Microsoft Corporation. All rights reserved.