16-05-16, 05:22 PM
أخي الفاضل :
قم بإضافة الكود التالي على Form في الحدث Resize
قم بإضافة الكود التالي على Form في الحدث Resize
PHP كود :
Dim g as Graphics = Me.CreateGraphics()
Dim startingPoint as Double = (Me.Width / 2) - (g.MeasureString(Me.Text.Trim, Me.Font).Width / 2)
Dim widthOfASpace As Double = g.MeasureString(" ", Me.Font).Width
Dim tmp As String = " "
Dim tmpWidth As Double = 0
Do
tmp += " "
tmpWidth += widthOfASpace
Loop While (tmpWidth + widthOfASpace) < startingPoint
Me.Text = tmp & Me.Text.Trim & tmp
Don't Be The Perfect one
be the right one

