Your fix does not work correctly if e. g. a picturebox is set to vbPixels.