Have you tried Tracing the EdtWidth and EdtHeight values? I've got a feeling it might not be reading them right. Don't know, but it might have something to do with the type conversion, although I would have imagined it would convert to an integer ok.
EDIT: parseInt... Does that mean I was right (even if I was late
)
I think the missing pixels in the size may be something to do with the window borders possibly? 32 pixels for a top border seems about right to be honest