Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27349

VS 2013 insert panel

$
0
0
i want to add / remove a panel to the form via a button, with this button i want to create as many panels as i like. So how can i (index =>vb6) make a control array off this code ?



Protected usrCntl = New Panel()

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

usrCntl.Location = New Point(20, 60)
usrCntl.Size = New Size(110, 100)
usrCntl.BackColor = Color.Red

Controls.Add(usrCntl)
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Controls.Remove(usrCntl)
End Sub

Viewing all articles
Browse latest Browse all 27349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>