The differential in Time on
Code:
c.Color = Color.FromArgb(X1 Mod 256, Y1 Mod 256, (X1 + Y1) Mod 256)
BufferGObj.DrawRectangle(c, X1, Y1, Y2 - 1, Y2 - 1)
Is spent in parameter validation and result verification before calling the Native GDI. These are both important elements in having a program which behaves in a well defined manner, and is secure (many code native routines can only do limited validation on parameters), but it does come at a price.
I agree that for a graphics intensive application that this can present a problem. Regardless of language optimizing your drawing to minimize the number of discrete calls will result in a performance improvement, but this is especially true for managed code.
If the goal was to have identical functionallity for the above two lines, then the VB6.0 code needs to check all parameters for validity and also check the return status of all API calls.