weixin_40187983 2018-12-05 06:42 采纳率: 100%
浏览 1654
已采纳

vb.net 用代码产生label panel picturebox,如何将Label置于最上层?

-->产生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)

                    谢谢
  • 写回答

1条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 在matlab中如何进行三个参数的离散傅里叶逆变换(idft)
      • ¥15 遇到问题了,求解答!
      • ¥15 请问coppliasim eduUR5视觉抓取怎么实现仿真,
      • ¥30 JavaWeb实验(购物平台)
      • ¥15 八路抢答器倒计时设计时显示器不输出,只能显示0
      • ¥15 用C语言随机生成一个迷宫
      • ¥15 超多因素的正交方案设计
      • ¥15 Scratch~汽车小游戏
      • ¥30 OSGB转换为3dtiles
      • ¥25 用于Audio的芯片中“Audio Interface”和“Mode Control”是什么?