Ejemplo n.º 1
0
 internal void SetFocus()
 {
     if (activeObject != null)
     {
         IntPtr hWnd;
         if (activeObject.GetWindow(out hWnd) == Interop.S_OK)
         {
             Win32.SetFocus(hWnd);
         }
     }
 }
Ejemplo n.º 2
0
 internal void SetFocus()
 {
     if (activeObject != null)
     {
         IntPtr hWnd = IntPtr.Zero;
         if (activeObject.GetWindow(out hWnd) == Interop.S_OK)
         {
             Debug.Assert(hWnd != IntPtr.Zero);
             Interop.SetFocus(hWnd);
         }
     }
 }
Ejemplo n.º 3
0
 void Interop.IOleInPlaceFrame.SetActiveObject(Interop.IOleInPlaceActiveObject pActiveObject, string pszObjName)
 {
     try {
         if (pActiveObject == null)
         {
             if (this.activeObject != null)
             {
                 Marshal.ReleaseComObject(this.activeObject);
             }
             this.activeObject = null;
             this.windowHandle = IntPtr.Zero;
         }
         else
         {
             this.activeObject = pActiveObject;
             this.windowHandle = new IntPtr();
             pActiveObject.GetWindow(out this.windowHandle);
         }
     }
     catch {
     }
 }