Graphics in modules?

Hello,
i have a lot of drawing calculations of graphs, diagrams with lettering and so on in a paint event.
This paint event is crowded.
Is there a possibility to write it in single modules?

Is this a single canvas? You could try using several canvasses.

Of course.

Create methods with ‘g as graphics’ as a parameter
In your Paint event , call them like this:

DoLines(g)
DoWords(g)
AddCopyright(g)

etc

2 Likes

Thank you Jeff!

That works!

you can also subclass a canvas, and there you can add methods, properties, all you want.