本文整理匯總了VB.NET中System.Windows.Forms.Panel類的典型用法代碼示例。如果您正苦於以下問題:VB.NET Panel類的具體用法?VB.NET Panel怎麽用?VB.NET Panel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Panel類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: CreateMyPanel
Public Sub CreateMyPanel()
Dim panel1 As New Panel()
Dim textBox1 As New TextBox()
Dim label1 As New Label()
' Initialize the Panel control.
panel1.Location = New Point(56, 72)
panel1.Size = New Size(264, 152)
' Set the Borderstyle for the Panel to three-dimensional.
panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
' Initialize the Label and TextBox controls.
label1.Location = New Point(16, 16)
label1.Text = "label1"
label1.Size = New Size(104, 16)
textBox1.Location = New Point(16, 32)
textBox1.Text = ""
textBox1.Size = New Size(152, 20)
' Add the Panel control to the form.
Me.Controls.Add(panel1)
' Add the Label and TextBox controls to the Panel.
panel1.Controls.Add(label1)
panel1.Controls.Add(textBox1)
End Sub