-->产生Panel
Dim panel As New Panel
Dim row As Integer '行数
Dim colume As Integer '行数
If i Mod rowCount > 0 Then
row = i \ rowCount + 1
colume = i Mod rowCount
Else
row = i \ rowCount
colume = rowCount
End If
With panel
.Name = "Panel" + i.ToString()
.Left = (colume - 1) * 520 * rate
.Top = ((row - 1) * 550 * rate) + 10
.Width = 520 * rate
.Height = 525 * rate
.Parent = Me
.BackColor = Color.Blue
End With
Controls.Add(panel)
产生PictureBox
Dim pic() As PictureBox
ReDim pic(1)
pic(1) = New PictureBox
这个产生的代码,要置于Panel及PictureBox的最上方,请问代码如何改呢?
Dim lab2 As New Label
With lab2
.Name = "Lab" + i.ToString()
.ForeColor = Color.Yellow
.Font = New System.Drawing.Font("宋体", 20)
.Text = "2018/1/1"
.Left = (30 + 260) * rate + (colume - 1) * 500 * rate
.Top = ((row) * 525 * rate + (row - 1) * 25 * rate) + (-10)
.Width = 150
.Height = 30
.Parent = Me
.Visible = True
End With
Controls.Add(lab2)
谢谢