如何使用panel

来源:互联网 发布:淘宝识图购物 编辑:程序博客网 时间:2024/06/12 01:05
 
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(5672)
    panel1.Size 
= New Size(264152)
    
' 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(1616)
    label1.Text 
= "label1"
    label1.Size 
= New Size(10416)
    textBox1.Location 
= New Point(1632)
    textBox1.Text 
= ""
    textBox1.Size 
= New Size(15220)
    
    
' 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


原创粉丝点击