Create Groupbox and textbox at runtime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • huskar
    New Member
    • Mar 2012
    • 6

    Create Groupbox and textbox at runtime

    What's wrong with thes code! everone??...why i click the BOOK button there is nothing happens

    Private Sub btnBook_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles btnBook.Click

    Dim gboChildren As GroupBox
    Dim txtName As TextBox
    Dim iPositionIncres eament As Integer = 200
    Dim iTest As Integer = 0
    iTest = CInt(txtChildre n.Text)

    For iCounter As Integer = 1 To iTest
    gboChildren = New GroupBox
    gboChildren.Nam e = "Children " & iTest
    gboChildren.Loc ation = New Point(30, 400 + iPositionIncres eament)
    gboChildren.Aut oSize = True
    txtName = New TextBox
    gboChildren.Con trols.Add(txtNa me)
    Next



    End Sub
  • Guido Geurs
    Recognized Expert Contributor
    • Oct 2009
    • 767

    #2
    Is this .Net ?
    Please, if so, place this call in the right forum.

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      "Handles btnBook.Click"? Yes, this is .Net code not VB6 or older.

      Comment

      Working...