当前位置: 首页>>代码示例>>VB.NET>>正文


VB.NET Panel.BorderStyle属性代码示例

本文整理汇总了VB.NET中System.Windows.Forms.Panel.BorderStyle属性的典型用法代码示例。如果您正苦于以下问题:VB.NET Panel.BorderStyle属性的具体用法?VB.NET Panel.BorderStyle怎么用?VB.NET Panel.BorderStyle使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在System.Windows.Forms.Panel的用法示例。


在下文中一共展示了Panel.BorderStyle属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。

示例1: CreateMyPanel

Public Sub CreateMyPanel()
    Dim panel1 As New Panel()
       
    ' 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
End Sub
开发者ID:VB.NET开发者,项目名称:System.Windows.Forms,代码行数:9,代码来源:Panel.BorderStyle

示例2: PanelInAction

' 导入命名空间
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms

public class PanelInAction
   public Shared Sub Main
        Application.Run(New Form1)
   End Sub
End class

Public Class Form1
    Inherits System.Windows.Forms.Form

    Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
    Friend WithEvents Label1 As System.Windows.Forms.Label


    Dim Panel1 As New Panel
    Dim Panel2 As New Panel
    Dim WithEvents RadioButton1 As New RadioButton
    Dim WithEvents RadioButton2 As New RadioButton
    Dim WithEvents RadioButton3 As New RadioButton
    Dim WithEvents RadioButton4 As New RadioButton
    Dim WithEvents RadioButton5 As New RadioButton
    Dim WithEvents RadioButton6 As New RadioButton

    Public Sub New()
        MyBase.New()

        Me.TextBox1 = New System.Windows.Forms.TextBox
        Me.Label1 = New System.Windows.Forms.Label
        Me.SuspendLayout()

        Me.TextBox1.Location = New System.Drawing.Point(8, 200)
        Me.TextBox1.Name = "TextBox1"
        Me.TextBox1.Size = New System.Drawing.Size(272, 20)
        Me.TextBox1.TabIndex = 0
        Me.TextBox1.Text = ""

        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(292, 273)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.TextBox1)
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.ResumeLayout(False)


        Panel1.Location = New Point(20, 60)
        Panel1.Size = New Size(110, 100)
        Panel1.BorderStyle = BorderStyle.FixedSingle

        Panel2.Location = New Point(140, 60)
        Panel2.Size = New Size(110, 100)
        Panel2.BorderStyle = BorderStyle.FixedSingle

        RadioButton1.Location = New Point(6, 16)
        RadioButton1.Text = "Radio Button 1"
        RadioButton1.Size = New Size(120, 16)

        RadioButton2.Location = New Point(6, 36)
        RadioButton2.Text = "Radio Button 2"
        RadioButton2.Size = New Size(120, 20)

        RadioButton3.Location = New Point(6, 56)
        RadioButton3.Text = "Radio Button 3"
        RadioButton3.Size = New Size(120, 20)

        RadioButton4.Location = New Point(6, 16)
        RadioButton4.Text = "Radio Button 4"
        RadioButton4.Size = New Size(120, 16)

        RadioButton5.Location = New Point(6, 36)
        RadioButton5.Text = "Radio Button 5"
        RadioButton5.Size = New Size(120, 20)

        RadioButton6.Location = New Point(6, 56)
        RadioButton6.Text = "Radio Button 6"
        RadioButton6.Size = New Size(120, 20)

        Panel1.Controls.Add(RadioButton1)
        Panel1.Controls.Add(RadioButton2)
        Panel1.Controls.Add(RadioButton3)

        Panel2.Controls.Add(RadioButton4)
        Panel2.Controls.Add(RadioButton5)
        Panel2.Controls.Add(RadioButton6)

        Controls.Add(Panel1)
        Controls.Add(Panel2)

        AddHandler RadioButton1.CheckedChanged, AddressOf _
            RadioButton1_CheckedChanged
        AddHandler RadioButton2.CheckedChanged, AddressOf _
            RadioButton2_CheckedChanged
        AddHandler RadioButton3.CheckedChanged, AddressOf _
            RadioButton3_CheckedChanged
        AddHandler RadioButton4.CheckedChanged, AddressOf _
            RadioButton4_CheckedChanged
        AddHandler RadioButton5.CheckedChanged, AddressOf _
            RadioButton5_CheckedChanged
        AddHandler RadioButton6.CheckedChanged, AddressOf _
            RadioButton6_CheckedChanged

    End Sub

    Private Sub RadioButton1_CheckedChanged(ByVal sender As _
        System.Object, ByVal e As System.EventArgs) 
        TextBox1.Text = "You clicked radio button 1"
    End Sub

    Private Sub RadioButton2_CheckedChanged(ByVal sender As _
        System.Object, ByVal e As System.EventArgs) 
        TextBox1.Text = "You clicked radio button 2"
    End Sub

    Private Sub RadioButton3_CheckedChanged(ByVal sender As _
        System.Object, ByVal e As System.EventArgs) 
        TextBox1.Text = "You clicked radio button 3"
    End Sub
    Private Sub RadioButton4_CheckedChanged(ByVal sender As _
        System.Object, ByVal e As System.EventArgs) 
        TextBox1.Text = "You clicked radio button 4"
    End Sub
    Private Sub RadioButton5_CheckedChanged(ByVal sender As _
        System.Object, ByVal e As System.EventArgs) 
        TextBox1.Text = "You clicked radio button 5"
    End Sub
    Private Sub RadioButton6_CheckedChanged(ByVal sender As _
        System.Object, ByVal e As System.EventArgs) 
        TextBox1.Text = "You clicked radio button 6"
    End Sub
End Class
开发者ID:VB程序员,项目名称:System.Windows.Forms,代码行数:134,代码来源:Panel.BorderStyle


注:本文中的System.Windows.Forms.Panel.BorderStyle属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。