>>Hi all,
>>
>>I have a form with some containers on it. Some of the containers are inside of a larger container.
>>On the small container objects are image objects that display the status of a container, if it is selected or not.
>>
>>When clicking on those containers they toggle between selected and unselected, that will make the image on the container visible or not.
>>Sometimes, and irregularly, but frequently, during clicking on a container, white shapes appear on the form on certain places on the form, see attached image, I circled those white areas so you understand what I mean.
>>
>>I tried to limit my intake of LSD and other psychedelic drugs, but to no avail.
>>I tried THISFORM.DRAW() but that does not do anything, although I would have imagined this to be the only solution.
>>
>>The white areas disappear as soon as I would resize the form. I hope someone has an idea what could be a solution for this.
>
>
>I don't suggest this as a fix even if it works, but as a curiosity, if you set .Themes = .F., does that prevent it?
>
>Also, one thing you might do after your Draw() code is add this:
>
DECLARE INTEGER InvalidateRect IN WIN32API INTEGER hwnd, INTEGER ignore1, INTEGER ignore2
>InvalidateRect(thisForm.hwnd, 0, 1)
>
>That will force the window to repaint itself at the Windows OS level, and may help it "go away".
The Themes = .F. had no effect.
But InvalidateRect() does work perfectly, I don't even need to call THISFORM.Draw().
So I created a method THISFORM.Redraw() and put the API call in there.
Thank you!
Christian Isberner
Software Consultant