Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is not an exact answer since it is for the WinForms control, but perhaps will be useful in case you decide to use it in a WindowsFormsHost instead of the WPF control, which exposes way too little to be useful.</p> <p>You could use an OLE commands through ExecWB on the ActiveX instance: <code>OLECMDID_ZOOM</code> for text size and <code>OLECMDID_OPTICAL_ZOOM</code> for optical zoom. For example,</p> <pre><code>object pvaIn = 200; // A VT_I4 percentage ranging from 10% to 1000% var browserInst = ((SHDocVw.IWebBrowser2)(browserContol.ActiveXInstance)); browserInst.ExecWB(SHDocVw.OLECMDID.OLECMDID_OPTICAL_ZOOM, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, ref pvaIn, IntPtr.Zero); </code></pre> <p>Some notes:</p> <ul> <li>a reference to Interop.SHDocVw assembly is needed</li> <li>the command succeeds only after a document has loaded</li> <li>the range of pvaIn could be retrieved via <code>OLECMDID_GETZOOMRANGE</code></li> <li>for reference list of commands is on <a href="http://msdn.microsoft.com/en-us/library/ms691264%28v=vs.85%29.aspx" rel="nofollow">MSDN</a></li> <li>I experienced this strange behavior that seemed to happen only on non-96 dpi. Upon startup, the rendered text size did not correspond to that stored in OLECMDID_ZOOM state. Setting the value (to any value) did not fix the discrepancy: the rendered size is still what looked like [stored size + 2]. When optical zoom was set to 100%, the discrepancy in text-size went away (text size visibly shrank after zooming to 100%). This did't happen in IE, and perhaps that was just a weird artifact in my environment -- but just fyi.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload