Is there a way to get the form active control?
I was checking in the help for the "Support.GetActiveControl"
method but it isn't supported :) for the Compact Framework.
I suppose that I can track the focus by adding a custom GotFocus
event handler to all the form controls, but I'm looking for a more generic way that can be implemented for any form.
This example displays the name of the currently selected Windows Forms control in a Label control.
private void DisplayNameOfActiveControl()
{
label1.Text = this.ActiveControl.Name;
}