vb.net控件大小 vbnet datagridview控件详解( 三 )


RadioButton TabIndex =
RadioButton Text = 四单元
RadioButton
RadioButton Location = New System Drawing Point( )
RadioButton Name = RadioButton
RadioButton Size = New System Drawing Size( )
RadioButton TabIndex =
RadioButton Text = 二楼
RadioButton
RadioButton Location = New System Drawing Point( )
RadioButton Name = RadioButton
RadioButton Size = New System Drawing Size( )
RadioButton TabIndex =
RadioButton Text = 三楼
RadioButton
RadioButton Location = New System Drawing Point( )
RadioButton Name = RadioButton
RadioButton Size = New System Drawing Size( )
RadioButton TabIndex =
RadioButton Text = 一楼
RadioButton
RadioButton BackColor = System Drawing SystemColors Control
RadioButton Location = New System Drawing Point( )
RadioButton Name = RadioButton
RadioButton Size = New System Drawing Size( )
RadioButton TabIndex =
RadioButton Text = 四楼
分别把它们添加到父控件GroupBox的Controls集合中
GroupBox Controls Add(RadioButton )
GroupBox Controls Add(RadioButton )
GroupBox Controls Add(RadioButton )
GroupBox Controls Add(RadioButton )
GroupBox Controls Add(RadioButton )
GroupBox Controls Add(RadioButton )
GroupBox Controls Add(RadioButton )
【vb.net控件大小 vbnet datagridview控件详解】 GroupBox Controls Add(RadioButton )
GroupBox Controls Add(RadioButton )
GroupBox Controls Add(RadioButton )
End Sub
把上一页的代码复制添加后 把控件初始化过程InitializeControl()过程添加到Form 的New构造函数中 如下图二所示
图二 在New构造函数中添加过程InitializeControl()
现在按F 运行 Form 的窗体控件布局(如下图三所示)是不是和我们手工布局的图一的布局是一样的呢?
lishixinzhi/Article/program/ASP/201311/21749
在VS2008的vb.net中,怎样设置使 listview控件 随窗口调整而改变它的大小listviewvb.net控件大小的属性中找到dock点击选择fill就可以vb.net控件大小了,当你在最大化最小化时就会随窗体一同改变 。
在vb.net中如何按窗体比例缩放控件大小你设一下你控件的anchor和dock两个属性 , 可以达到你满意的组合效果 。包括位置和大小比例变化 。
vb.net 如何使得控件随着窗体大小 的改变而改变呢,大家帮忙给想想,最好有代码的哦Public Class Form1
Dim 初始化控件自动大小调整与窗口的宽度比例 As Integer
Dim 初始化控件自动大小调整与窗口的高度比例 As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
初始化控件自动大小调整与窗口的宽度比例 = Me.Width / 控件自动大小调整.Width
初始化控件自动大小调整与窗口的高度比例 = Me.Height / 控件自动大小调整.Height
显示控件的位置坐标()
End Sub
Private Sub Form1_ResizeEnd(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.ResizeEnd
' Form1_ResizeEnd这个事件是 窗口大小变化完成后 再进行操作的
控件自动大小调整.Location = New Point(控件自动大小调整.Left, 控件自动大小调整.Top)
'设置控件的初始左位置坐标与上位置坐标
控件自动大小调整.Size = New Point(Int(Me.Width / 初始化控件自动大小调整与窗口的宽度比例), Int(Me.Height / 初始化控件自动大小调整与窗口的高度比例))
'更改控件的大小按第一次窗口的比例 进行调整
显示控件的位置坐标()
End Sub
Private Sub 显示控件的位置坐标()
Label1.Text = "控件的上边距坐标vb.net控件大?。?"控件自动大小调整.Top

推荐阅读