private
int
y;
private
void
Form1_Load(
object
sender, EventArgs e)
{
y = 0;
}
private
void
Form1_Paint(
object
sender, PaintEventArgs e)
{
this
.VerticalScroll.Value = y;
}
private
void
Form1_Scroll(
object
sender, ScrollEventArgs e)
{
y =
this
.VerticalScroll.Value;
}