Dear Friend,
The following code example demonstrates the AutoSize property. To run this example, paste the following code in a form and call the InitializeLabel method from the form's constructor or Load method.
Friend WithEvents Label1 As System.Windows.Forms.Label
Private Sub InitializeLabel()
Me.Label1 = New Label
Me.Label1.Location = New System.Drawing.Point(10, 10)
Me.Label1.Name = "Label1"
Me.Label1.TabIndex = 0
Me.Label1.Size = New System.Drawing.Size(10, 10)
Me.Controls.Add(Me.Label1)
Me.Label1.AutoSize = True
Me.Label1.Text = "The text in this label is longer than the set size."
End Sub