I have a graph with text boxes and lines connecting text boxes dynamically on a form. But whenever the graph grows big and scroll bars appear the lines connecting the textboxes disappear. same is the case when i add new controls like datagridview.
How should i overcome this. why is the form getting repainted?
Windows loves to repaint things whenever possible, one of the main triggers being when any part of the surface is uncovered, or changes size.
I use VB6, so this may all be nonsense if you're using a later version.
I've always been a little vague on the relationships between the various properties, and generally have to get things working by trial and error. But I believe both
.AutoRedraw and
.ClipControls relate to this. Certainly it seems likely that anything you have drawn with AutoRedraw turned off will need to be redrawn any time a repaint occurs.