private void SetBrowserControlZoom(int zoomPercent) { NativeWrapper.IWebBrowser2 browser2 = (NativeWrapper.IWebBrowser2) this.WebBrowser.ActiveXInstance; NativeWrapper.IOleCommandTarget cmdTarget = browser2.Document as NativeWrapper.IOleCommandTarget; if (cmdTarget != null) { const int OLECMDID_OPTICAL_ZOOM = 63; const int OLECMDEXECOPT_DONTPROMPTUSER = 2; object[] commandInput = { zoomPercent }; int hResult = cmdTarget.Exec( IntPtr.Zero, OLECMDID_OPTICAL_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER, commandInput, IntPtr.Zero); Marshal.ThrowExceptionForHR(hResult); } }
public int ShowUI(int dwID, NativeWrapper.IOleInPlaceActiveObject activeObject, NativeWrapper.IOleCommandTarget commandTarget, NativeWrapper.IOleInPlaceFrame frame, NativeWrapper.IOleInPlaceUIWindow doc) { return(S_FALSE); }