Jimmie Tyrrell
Guest
|
I've created an Outlook Add-in using Add-in Express and it's been really easy so far. I want the add-in (a sidebar Outlook Form) to display a web page, so I've added a WinForms WebBrowser control to my main form.
However, whatever page I display in the WebBrowser, I get rendering glitches when Outlook is resized. See the screenshots below:
Before resizing:
After resizing:
I?Â?Ð?éve tried the following:
- Outlook 2010 (64-bit) and Outlook 2013 (32-bit)
- Enabling / disabling Graphics acceleration
- Enabling / disabling WebBrowser double buffering
- Attempted to trigger a redraw in various hacky ways....
- - Invalidated the WebBrowser and/or Form
- - Changed the WebBrowser?Â?Ð?és Location / size
- - Triggered Javascript to cause a redraw (Document.Body.Style = ?Â?Ð?ìdisplay:none;?Â?Ð?í; Document.Body.Style = ?Â?Ð?ìdisplay:block;?Â?Ð?í;
- - Adding and removing the WebBrowser
- - Disabled / changed Dock values
Interesting things I've noted:
- Other Controls do not have this problem, only WebBrowser
- Minimizing then restoring Outlook redraws the WebBrowser properly
- Adding/Removing WebBrowser during a resize does not cause a redraw. But adding/removing *after* the user has resized (i.e., they've released the mouse button) will trigger a redraw. It's as if IE will not redraw until a ResizeEnd occurs. Unfortunately, I have not found a way to detect the ResizeEnd event on Outlook windows.
My system is:
Windows 7 Ultimate 64-bit w/ SP1
Intel i7-4960HQ 2.6 GHz
NVIDIA GeForce GT 750M
16 gb ram
IE 11 installed
Has anyone else seen this behavior or have any ideas? Please let me know. Much appreciated! |
|
Andrei Smolin
Add-in Express team
Posts: 19041
Joined: 2006-05-11
|
Hello Jimmie,
It looks like you place the Web Browser component on a form shown in a ReadingPane* layout. If so, we know about this problem. It cannot be fixed in the code of Add-in Express. We suggest using a workaround which significantly improves the situation. Still, it doesn't guarantee that artifacts will disappear completely.
Please check this sample project:
http://temp.add-in-express.com/support/WebBrowserInReadingPane.zip
Andrei Smolin
Add-in Express Team Leader |
|
Jimmie Tyrrell
Guest
|
Hi Andrei, thanks so much for your suggestion. I didn't realize this problem was specific to the ReadingPane layout. It turns out I actually wanted DockRight anyway. I've since changed this property and the WebBrowser renders just fine. Thanks so much for the information. |
|
Andrei Smolin
Add-in Express team
Posts: 19041
Joined: 2006-05-11
|
You are welcome!
Andrei Smolin
Add-in Express Team Leader |
|