Control GetFocusedControl(Control ctrl)
{
foreach (Control c in ctrl.Controls)
{
if (c.Focused == false)
{
GetFocusedControl(c);
}
return c;
}
return null;
}
private void button1_Click(object sender, EventArgs e)
{
Control c= GetFocusedControl(this);
}
{
foreach (Control c in ctrl.Controls)
{
if (c.Focused == false)
{
GetFocusedControl(c);
}
return c;
}
return null;
}
private void button1_Click(object sender, EventArgs e)
{
Control c= GetFocusedControl(this);
}