/// <summary> /// Removes the first occurrence of a specific <see cref="Control"/> from the <see cref="ControlCollection"/>. /// </summary> /// <param name="child">The <see cref="Control"/> to remove from the <see cref="ControlCollection"/>.</param> /// <returns>true if child is successfully removed; otherwise, false. This method also returns false if child was not found in the <see cref="ControlCollection"/>.</returns> public new bool Remove(Control child) { if (child == null) { throw new ArgumentNullException(nameof(child)); } if (child.IsInvalid) { throw new InvalidHandleException(); } if (!Contains(child)) { return(false); } if (Owner.IsInvalid) { throw new InvalidHandleException(); } Libui.FormDelete(Owner.Handle, child.Index); return(base.Remove(child) ? true : false); }