Public Class b
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Button2 As New Button
Button2.Name = "Button2"
Button2.Text = "box1"
Button2.Top = 10
Button2.Left = 10
Me.Controls.Add(Button2)
End Sub
End Class
while compiling it i got error like "top level controls can not be added to control"
what to do?
This post has been edited by AdamSpeight2008: 06 March 2012 - 10:48 PM
Reason for edit:: Please use the CODETAGS for encasing code

New Topic/Question
Reply



MultiQuote






|