public int GetHostInfo(Interop.DOCHOSTUIINFO info)
 {
     info.dwDoubleClick = Interop.DOCHOSTUIDBLCLICK_DEFAULT;
     int flags = 0;
     if (hostControl.AllowInPlaceNavigation) {
         flags |= Interop.DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION;
     }
     if (!hostControl.Border3d) {
         flags |= Interop.DOCHOSTUIFLAG_NO3DBORDER;
     }
     if (!hostControl.ScriptEnabled) {
         flags |= Interop.DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE;
     }
     if (!hostControl.ScrollBarsEnabled) {
         flags |= Interop.DOCHOSTUIFLAG_SCROLL_NO;
     }
     if (hostControl.FlatScrollBars) {
         flags |= Interop.DOCHOSTUIFLAG_FLAT_SCROLLBAR;
     }
     info.dwFlags = flags;
     return Interop.S_OK;
 }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="group"></param>
        /// <param name="nCmdID"></param>
        /// <returns></returns>
        /// <remarks>
        /// Main Accelerator Keys Supported by MsHtml 
        /// Accelerator |  Description  
        /// Ctrl-N | Opens the current HTML document in a new WebBrowser window.
        /// Crtl-P | Displays a Print dialog box for printing the HTML document.
        /// Ctrl-A | Selects the entire contents of the HTML document.
        /// Crtl-F | Displays a Find dialog box for searching the HTML document.
        /// F5, Ctrl-F5 | Refreshes the currently loaded HTML document.
        /// </remarks>
        public int TranslateAccelerator(Interop.COMMSG msg, ref System.Guid group, int nCmdID)
        {
            const int WM_KEYDOWN = 0x0100;
            const int VK_CONTROL = 0x11;

            if (msg.message != WM_KEYDOWN)
                return Interop.S_FALSE;				// no keydown, allow message

            Keys keyData = Keys.None;
            if (Interop.GetAsyncKeyState(VK_CONTROL) < 0)
                keyData |= Keys.Control;				// Ctrl key pressed

            int key = msg.wParam.ToInt32();
            key &= 0xFF; // get the virtual keycode
            keyData |= (Keys)key;

            KeyEventArgs kea = new KeyEventArgs(keyData);
            //hostControl.OnTranslateAccelerator(kea);

            if (kea.Handled)
                return Interop.S_OK;

            // not handled, allow everything else
            return Interop.S_FALSE;
        }
 public int GetDropTarget(Interop.IOleDropTarget pDropTarget, out Interop.IOleDropTarget ppDropTarget)
 {
     ppDropTarget = null; // no other drop target
     return Interop.S_OK;
 }
 public int ShowUI(int dwID, Interop.IOleInPlaceActiveObject activeObject, Interop.IOleCommandTarget commandTarget, Interop.IOleInPlaceFrame frame, Interop.IOleInPlaceUIWindow doc)
 {
     return Interop.S_OK;
 }
 public int ShowContextMenu(int dwID, Interop.POINT pt, object pcmdtReserved, object pdispReserved)
 {
     //			int ret = Interop.S_FALSE;
     //			Point location = hostControl.PointToClient(new Point(pt.x, pt.y));
     //			BrowserContextMenuCancelEventArgs e = new BrowserContextMenuCancelEventArgs(location, false);
     //			try {
     //				hostControl.OnShowContextMenu(e);
     //			}
     //			catch {}
     //			finally {
     //				if (e.Cancel)
     //					ret = Interop.S_OK;
     //			}
     return 1;
 }
 public int Scroll(Interop.tagSIZE scrollExtent)
 {
     // TODO:  Add DocHostUIHandler.Scroll implementation
     return 0;
 }
 public int ResizeBorder(Interop.COMRECT rect, Interop.IOleInPlaceUIWindow doc, bool fFrameWindow)
 {
     return Interop.E_NOTIMPL;
 }
 public void GetWindowContext(out Ecyware.GreenBlue.GreenBlueMain.Interop.IOleInPlaceFrame ppFrame, out Ecyware.GreenBlue.GreenBlueMain.Interop.IOleInPlaceUIWindow ppDoc, Ecyware.GreenBlue.GreenBlueMain.Interop.COMRECT lprcPosRect, Ecyware.GreenBlue.GreenBlueMain.Interop.COMRECT lprcClipRect, Interop.tagOIFI lpFrameInfo)
 {
     // TODO:  Add DocHostUIHandler.GetWindowContext implementation
     ppFrame = null;
     ppDoc = null;
 }