The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This documentation is archived and is not being maintained.
In order for a control to receive input focus, the control must have a handle assigned to it, and the Visible and Enabled properties must both be set to true for both the control and all its parent controls, and the control must be a form or the control's outermost parent must be a form.
public:
void ControlSetFocus( Control^ control )
{
// Set focus to the control, if it can receive focus.if ( control->CanFocus )
{
control->Focus();
}
}