K
Ken Ellis
When I assign a ClipRectangle.Top property of 99 to an integer it becomes
220.I am trying to understand how scrolling works when drawing directly on
the client area of a form with no controls. I am following one of
Charles Petzold examples to which I have added some diagnostic code to
try and follow what is happening. The OnPaint method is:
protected override void OnPaint(PaintEventArgs pea)
{
Graphics grfx = pea.Graphics;
Brush brush = new SolidBrush(ForeColor);
Point pt = AutoScrollPosition;
int CrT = pea.ClipRectangle.Top; // diagnostic
int tempY = pt.Y; // diagnostic
if (tempY < -60) // diagnostic
{
int temp = 88; // breakpoint set here
}
220.I am trying to understand how scrolling works when drawing directly on
the client area of a form with no controls. I am following one of
Charles Petzold examples to which I have added some diagnostic code to
try and follow what is happening. The OnPaint method is:
protected override void OnPaint(PaintEventArgs pea)
{
Graphics grfx = pea.Graphics;
Brush brush = new SolidBrush(ForeColor);
Point pt = AutoScrollPosition;
int CrT = pea.ClipRectangle.Top; // diagnostic
int tempY = pt.Y; // diagnostic
if (tempY < -60) // diagnostic
{
int temp = 88; // breakpoint set here
}