Source/NFX.WinForms/Utils.cs
/// <summary>
/// Returns focused .NET control or null
/// </summary>
Returns focused .NET control or null
Returns focused . NET control or null
public static Control GetFocusedControl()
    {
      Control focusedControl = null;
      IntPtr focusedHandle = WinApi.UserApi.GetFocus();
      if (focusedHandle != IntPtr.Zero)
        focusedControl = Control.FromHandle(focusedHandle); 
      return focusedControl;
    }
public static Control GetFocusedControl ( ) { Control focusedControl = null ; IntPtr focusedHandle = WinApi . UserApi . GetFocus ( ) ; if ( focusedHandle != IntPtr . Zero ) focusedControl = Control . FromHandle ( focusedHandle ) ; return focusedControl ; }
Returns focused .NET control or null
Returns focused . NET control or null
// Fcused Control may be non-net control