FIX: Repaint Prob Adding Graphical Control as Child of Graph

Last reviewed: October 30, 1997
Article ID: Q102606
2.00 WINDOWS kbprg kbbuglist The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic

  programming system for Windows, version 2.0

SYMPTOMS

In Visual Basic version 2.0 if you add one of the graphical controls (label, image, or line control) as a child to the graph control, the graph image within the graph control is repainted incorrectly and the graphical control moved behind the graph image. The problem does not occur when non-graphical controls are used.

CAUSE

This is caused by a bug in the graph control where the repainting of the graph image cannot handle the graphical controls as child controls.

WORKAROUND

To avoid this problem, place a picture box as a child on the graph. Then place the graphical control in the picture box. This works well when using the label control but is not very useful when using the other graphical controls.

The only other way to work around this problem in Visual Basic version 2.0 is to not add a graphical control as a child of the Graph control; that is, use only non-graphical controls.

STATUS

Microsoft has confirmed this to be a bug in Visual Basic version 2.0 for Windows. This problem was corrected in Visual Basic version 3.0 for Windows

MORE INFORMATION

This problem was fixed in Visual Basic version 3.0 with the new version of the graph control (GRAPH.VBX version 2.0). The solution was to remove the ability of the graph control to support child controls. Therefore, in Visual Basic version 3.0, you cannot add any control as a child to the graph control.


Additional reference words: 2.00 3.00 buglist2.00 fixlist3.00
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsCus
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.