本文介绍了我们可以在VB.Net中更改标签大小吗?如果可以,请给我解决方案.....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人知道吗?
我们可以在VB.Net中更改标签大小吗?如果可以,请给我解决方案.....
Can anyone know?
can we change the label size in VB.Net?if yes give me solution.....
推荐答案
' Declare a label.
Friend WithEvents Label1 As System.Windows.Forms.Label
' Initialize the 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
' Set the label to a small size, but set the AutoSize property
' to true. The label will adjust its length so all the text
' is visible, however if the label is wider than the form,
' the entire label will not be visible.
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
这篇关于我们可以在VB.Net中更改标签大小吗?如果可以,请给我解决方案.....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!