I am plotting a Julia Set in a panel named pnlGraph that is 601 x 601 pixels. I determine the color of each pixel in a Paint event, and plot the entire Set using the command pnlGraph.Refresh(). It takes the PC about a minute to plot all 361,201 pixels. If I see an error early in the process of the panel refreshing, I would like to be able to interrupt the refresh and do something else.
I have searched the internet and found something called DoEvents() that I am unable to use properly. Can anyone help me use DoEvents() or some other method to interrupt a panel in mid-refresh in order to save time? Thank you.