Canguro.Controller.Controller.getFocusControl C# (CSharp) 메소드

getFocusControl() 개인적인 메소드

Method to retrieve the control that currently has the Focus.
private getFocusControl ( ) : Control
리턴 System.Windows.Forms.Control
        Control getFocusControl()
        {
            Control focusControl = null;
            IntPtr focusHandle = Canguro.Utility.NativeMethods.GetFocus();
            if (focusHandle != IntPtr.Zero)
                // returns null if handle is not to a .NET control
                focusControl = Control.FromHandle(focusHandle);
            return focusControl;
        }