vb.net的小问题,我下面的代码设置了按钮与别的控件之间的距离为0,为什么还是保持原有的距离啊
PrivateSubForm1_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBas...
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load dim sbig(16,12) as button
For i = 0 To 15
For j = 0 To 11
sbig(i, j) = New Button()
sbig(i, j).Size = New Size(40, 40) sbig(i, j).Margin = New Padding(0, 0, 0, 0)
sbig(i, j).Padding = New Padding(0, 0, 0, 0)
sbig(i, j).Location = New Point(j * 40, i * 40)
Me.Controls.Add(sbig(i, j)) Next
Next
'注释:上述代码为初始化大地图
End Sub 展开
For i = 0 To 15
For j = 0 To 11
sbig(i, j) = New Button()
sbig(i, j).Size = New Size(40, 40) sbig(i, j).Margin = New Padding(0, 0, 0, 0)
sbig(i, j).Padding = New Padding(0, 0, 0, 0)
sbig(i, j).Location = New Point(j * 40, i * 40)
Me.Controls.Add(sbig(i, j)) Next
Next
'注释:上述代码为初始化大地图
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询