Let's say for example my OnPaint draws a line which is as long as a variable called length. Also there is a bool called color. If the bool is true, the line will be red, if it is false, the line will be black. Would be possible to have two different colored and different long lines on screen (My question is: OnPaint redraws the complete surface, but is it possible to have some drawings stay) ?
I know the question might be a bit confusing.
As far as i know there is no such function.
But you can create your own OnPaint method (without calling base.OnPaint()) and integrate this logic (by drawing only element what you need - and something may stay) but this is probably bad approach and may lead you to lots of mistakes.