System.Windows.Forms.Application.FindControlAt(Control, Point)

Here are the examples of the csharp api class System.Windows.Forms.Application.FindControlAt(Control, Point) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: Unity-WinForms
Source File: Application.cs
View license
private static Control FindControlAt(Control currentControl, Point position)
        {
            for (int i = currentControl.Controls.Count - 1; i >= 0; i--)
            {
                var child = currentControl.Controls[i];
                if (child.Visible == false || child.Enabled == false) continue;

                var childMClient = child.PointToClient(position);
                if (child.DisplayRectangle.Contains(childMClient))
                {
                    currentControl = child;
                    return FindControlAt(currentControl, position);
                }
            }

            return currentControl;
        }

2. Example

Project: Unity-WinForms
Source File: Application.cs
View license
private Control _ControlAt(Point mousePosition)
        {
            Control control = null;

     /n ..... /n //View Source file for more details /n }