I am occupying generating lines that link the vertices of a tree, but it does not generate the lines that are outside the range of the panel, even though I have the autoscroll in "true", and when I go down to review the vertices, the lines that were up disappear, this is the code
for (int ñ = 1; ñ <indice+bug; ñ++)//grega lineas
{
Pen myPen;
myPen = new Pen(Color.Black);
Graphics formGraphics;
formGraphics = panel1.CreateGraphics();
formGraphics.DrawLine(myPen, pos[ñ, 1] + 25, pos[ñ, 0], pos[cpila[ñ, 3], 1] + 25, pos[cpila[ñ, 3], 0]);
myPen.Dispose();
formGraphics.Dispose();
}