3

I have been researching on this for a while and can't seem to make any headway.

I am developing an Outlook shared add-in (in C# on .Net 4.0) that loads a web page within a web browser control on user request. I have tried using both the Windows.Forms.WebBrowser control and the AxSHDocVw.AxWebBrowser control. The web page I am loading has many html controls inclusive (but not limited to) of basic html/asp.net textbox and labels to Telerik buttons and redSelect controls.

The problem I am having is that when the user has a high DPI setting, the web page's controls are not re-sized correctly. That is, the labels and textBoxes are re-sized correctly, but other controls - mostly the Telerik ones - are not re-sized (or is it that they are scaled back??). However, if I open the same web page in IE, FF, Chrome or any other browser while in high DPI, all controls are scaled correctly.

I have tried setting the "FEATURE_BROWSER_EMULATION" registry key for outlook.exe as well, to no avail. As my application is an outlook shared add-in, I do not have a manifest to set the dpiAware setting.

Has anyone come across such an issue? Any help will be greatly appreciated. Thanks!

--EDIT--

On further testing I found that the issue is that Outlook is already declared as dpiAware. It is because of this that the Telerik controls do not get scaled. Is there a way that I can instruct the web browser control to display as dpi un-aware? Or is there a better way to solve this?

4

1 回答 1

2

Check next post You may experience resource limitations in the Graphics Device Interface (GDI) when you use the Microsoft Web Browser control. That post is related to the WinXP or Server 2003 computer that is running Microsoft Office XP or Microsoft Office 2003.

One more to look is FEATURE_IVIEWOBJECTDRAW_DMLT9_WITH_GDI

Internet Explorer 9. By default, the WebBrowser Control uses Microsoft DirectX to render webpages, which might cause problems for applications that use the Draw method to create bitmaps from certain webpages.

于 2013-07-19T02:21:47.360 回答