PictureBox and repaint event

U

user

Hello
i have PictureBox p1:
p1.Paint += new PaintEventHandler(MyFunction);
....
public void MyFunction(Object Sender, PaintEventArgs e)

and it works fine but: when i call:
p1.Refresh();

MyFunction() ADDS everything to my picture, and i want to
repaint it from the begining. How can i do it ?

Thanx
Michal
 
E

Ed Courtenay

I'm not 100% certain, but I think you want to use the Invalidate() method of
your PictureBox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top