I need to save the contents of a window to an image, save it and close the window. If I close the window on the Loaded event, the image will contain Window, some elements will be drawn ok, some others will only be half stretched or distorted, and others will not be displayed on the image.
If I set a timer and close the window after a certain time (something between 250 ms and 1 second, depending on the complexity of the window), all the images will be in order.
It looks like the window needs some time to fully display itself. Is there any way to know when this rendering was done to avoid using a timer and closing the window when we know that it has finished rendering it?
Thank.
source
share