每按一次button就有就增加的一label
我想做个程序,就是运行时,有个button1,然后每按一次就增加一个label.(位置等可以先忽备)我不知道代码怎么写,请各位大虾帮下我这个小虾米.谢了 Dim label1 As New Labellabel1.Visible = True 楼上的这样好像不太对吧.
呵呵
Public Class Form1Dim i As Integer = 1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim lablen As New Label
lablen.Parent = Me
lablen.BackColor = Color.Red
Dim loc As Point
loc.X = 120 + i
loc.Y = 120 + i
lablen.Location = loc
lablen.Visible = True
lablen.Show()
i += 10
End Sub
End Class
页:
[1]
