You need a method that will draw the view of your model into a graphics object. Then you either call it with the graphics from the paint event, or the graphics from the picture. Separate them in your thinking. They are totally separate, even though they produce the exact same result. There is no reason to use DrawInto for this.
This is actually quite easy. What you need to do is create a picture buffer at the top of the paint event, draw onto that and then draw the picture onto the canvas. That way the picture is always up to date.
In the Paint event:
// at the top
Dim gg as Graphics = g
Dim p as new picture(g.width,g.height)
G= p.graphics
... drawing code here ...
// at the bottom
gg.drawpicrure p, 0, 0
Then if you want it stored somewhere, save it. I don’t suggest doing it every time, but you could set a flag and then call refresh:
If savepic then
p.save(placeToSave, picture.formats.png)
Savepic = false
End if
Please do not create pictures in the paint event. You’re not in control of when the canvas is asked to be painted, it can be called +100s of times if the user resizes the window. The paint event (and any code it calls), needs to be as simple and light as possible.
Please follow @MarkusR method. Yes @MarkusR method will add the overhead of a function call everytime the OS asks the canvas to update, but it should take way less time than creating and releasing a picture.
@MarkusR method also allows you to use the same drawing code to pipe to a printer, PDF or a high resolution image.