-
_scrollPozition = - (pnlMain.AutoScrollPosition.Y); Result DialogResult = MessageBox.Show ("Delete:", MessageBoxButtons.YesNo); dgvClendar.Focus ();
private void pnlMain_Paint (object sender, PaintEventArgs e) {
if (pnlMain.AutoScrollPosition.Y == 0)
{
pnlMain.AutoScrollPosition = new Point(0, _scrollPozition);
_scrollPozition = 0;
}
}
it is installed on the paint, but if you look, everything is moved for a moment. I need to lock this scroll to start, or block drawing, and redraw after scrolling to the current position.
Kuki
source
share