When the source Icon does not provide an icon of size SystemInformation.SmallIconSize, the Form icon is not scaled correctly.
The CustomBorderForm.SmallIcon setter property uses the Icon class constructor to locate a version of SystemInformation.SmallIconSize, and later in OnNonClientAreaPaint it is
that such a size was found. If it was not found, the icon is still drawn using e.Graphics.DrawIconUnstretched(...) instead of e.Graphics.DrawIcon(...).
In CustomBorderForm.OnNonClientAreaPaint, change the following line:
if (smallIcon != null)
if (smallIcon != null && smallIcon.Size == SystemInformation.SmallIconSize)