I'm making an invoice printing program and I would like to print the invoice number in a box and center it automatically.
VB Code:
Dim invSize As SizeF = e.Graphics.MeasureString(InvNumber, fFont) Dim iX As Integer iX = 560 + (200 - CInt(invSize.Width) / 2)
The number is now right justified in the box, not in the center. What am I doing wrong?
560 is the x coordinate of the box, and 200 is the width.




Reply With Quote