本文整理汇总了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