Windows Window Redrawing


I have a question about windows redrawing that someone might be able to help me with…

The window is displayed too early with controls appearing as they are drawn. I suspect the problem is related to buffering as it works fine on mac.

Here is an example of my windows are appearing in Windows:
Windows Redrawing Issue

I have a reposition method in the Open event which put the window back to the last closing position. I’ve tried to hide the window until all items are added by setting the visible property to false and showing after the open even, but it doesn’t help.

Any ideas on how I might improve this?

Thanks for any help


Do you set properties of the controls in code before displaying the window?


dim x as mywindow x.contro1l.text = "hello" x.control2.backcolor = &cffffff

Setting some properties of controls can force them to display and bring the window with them.

You might defer some of the initialisation until the activate event.

[code]if m_initialised then
//do nothing
else = value

m_initialised = true

end if[/code]

Or you might set the top and left to get the window off screen while you initialise it, then move the completed window into view afterwards.

Very good - I believe that might be my problem thanks very much Jeff

You could grab a screen shot of the drawn window, and use it as backdrop for it. That way the window will immediately show as completed, and the controls redrawing may look less conspicuous.

Having no sample project to work from did not enable me to test, but I believe it should greatly improve your display.

You could also use a declare to prevent redrawing until you are sure all controls are intialized. From your screen movie, about 500 milliseconds.


Thanks Michel - I’ll wok on Jeff’s suggestion first and if there are still issues, I’ll try yours. Thank again