Painting problem

Link to my project: http://files.filefront.com/MyMoOexe/;8688126;/fileinfo.html

Click-hold and drag on the star map you'll see the problem, the tiled .png that comes into view doesnt' get refreshed and i don't know how to fix it.

code responsible:

private void panel1_MouseMove(object sender, MouseEventArgs e)

{

if (e.Button == MouseButtons.Left)

{

offsetX = e.X - prevScrollPoint.X;

offsetY = e.Y - prevScrollPoint.Y;

pointX = -(panel1.AutoScrollPosition.X);

pointY = -(panel1.AutoScrollPosition.Y);

pointX += -offsetX;

pointY += -offsetY;

panel1.AutoScrollPosition = new Point(pointX, pointY);

prevScrollPoint = e.Location;

}

}

private void panel1_MouseDown(object sender, MouseEventArgs e)

{

if (e.Button == MouseButtons.Left)

{

prevScrollPoint = e.Location;

panel1.Refresh();

}

}

private void panel1_MouseUp(object sender, MouseEventArgs e)

{

if (e.Button == MouseButtons.Left)

{

panel1.AutoScrollPosition = new Point(pointX, pointY);

}

}


Currently i'm researcing on how to force a paint through native function PostMessage(i think). Any help appreciated.
[1373 byte] By [w0lfshad3] at [2007-11-20 11:06:08]
# 1 Re: Painting problem
invoke Invalidate
MadHatter at 2007-11-9 11:36:19 >
# 2 Re: Painting problem
I tried Invalidate() and Update(), it's no good.

EDIT: Solved it by other means:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2217382&SiteID=1&mode=1
w0lfshad3 at 2007-11-9 11:37:20 >