« Tipp of the day: Mac … | Home | Map of blog visitors »

Tipp of the day: Blank HTMLViewer

29 12 10 - 17:15 On Mac OS X you can see sometimes that a page in htmlviewer does not show. The HTMLViewer turns white. That's bad for batch processing if you need to do something on the webpage.

For my application I solved this by using ScreenshotWindowRectMBS in the DocumentComplete event. I get a picture form the control. Now I use pic.CountColorMBS(&cFFFFFF) to count the white pixels and if that number is more than 95% of width*height, I set a flag. This flag causes another part of the app to reload the same URL in the htmlviewer. This may not be a solution for everyone, but for me it works :-)
No comments

Remember personal info?

Emoticons / Textile

Comment moderation is enabled on this site. This means that your comment will not be visible on this site until it has been approved by an editor.

Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.