Hello,
I have got a strange behaviour. The application is a form where the Form.Canvas is drawn directly, it is a text editor.
When moving the window over the screen without changing the window size, I get Paint events. First, I wonder about this behaviour, because the operating system should make this job and the application shouldn't have the necessity of repainting.
Second, repainting fails in this case. I get an empty white form window. (White is the background color.) Paint seems to fill the canvas with the background color - I haven't programmed it -, and drawing has no effect, even the drawing code gets executed. I can restore the content by changing the window size, in this case repainting works.
To observe the behaviour, I have checked
- the cliprect region is the whole window
- the foreground color / font color is OK.
I have really no idea anymore what happend. Perhaps someone had a similar problem.
My questions are:
related to the first subject: Is it a bug or a feature that Paint events are generated if the window is moved and not resized
related to the second subject: What else can I test to understand the malfunction of failed repainting?
Debug sessions are difficult, because the activating/deactivating the test form changes the behaviour.
Thanks for any hints.