private bool AssignActiveControlInternal(Control value)
{
Debug.Assert(value == null || (value.ParentInternal != null &&
this == value.ParentInternal.GetContainerControlInternal()));
if (activeControl != value)
{
// cpb: #7318
#if FALSE
if (activeControl != null)
{
AxHost.Container cont = FindAxContainer();
if (cont != null)
{
cont.OnOldActiveControl(activeControl, value);
}
}
#endif
activeControl = value;
UpdateFocusedControl();
if (activeControl == value)
{
// cpb: #7318
#if FALSE
AxHost.Container cont = FindAxContainer();
if (cont != null)
{
cont.OnNewActiveControl(value);
}
#endif
Form form = FindFormInternal();
if (form != null)
{
form.UpdateDefaultButton();
}
}
}
return(activeControl == value);
}