FIX: Repaint Prob Adding Graphical Control as Child of Graph (102606)



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0
  • Microsoft Visual Basic Professional Edition for Windows 2.0

This article was previously published under Q102606

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.

Modification Type:MajorLast Reviewed:10/30/2003
Keywords:kbbug kbfix KB102606