Hi, I am a complete VB newbie, and have been trying to figure out how to center a line of text to a label.
The text is coming from a textbox on the form..so far I have been using something like this:
e.Graphics.DrawString(txtheading.Text, New Font("Tahoma", 6, FontStyle.Bold), Brushes.Black, 20, 10)
but what I require is for the text to be centered regardless of the number of characters that make it up.
The label is 7.5mm x 3mm, I read that I would need to set a Rectangle, with the exact dimensions, but not sure how to do this, any help would be greatly appreciated.
thanks
jedip
The text is coming from a textbox on the form..so far I have been using something like this:
e.Graphics.DrawString(txtheading.Text, New Font("Tahoma", 6, FontStyle.Bold), Brushes.Black, 20, 10)
but what I require is for the text to be centered regardless of the number of characters that make it up.
The label is 7.5mm x 3mm, I read that I would need to set a Rectangle, with the exact dimensions, but not sure how to do this, any help would be greatly appreciated.
thanks
jedip