In my case, i want to make some tool with event, example : make a new textbox with event button click. Can Visual Studio 2005 vb.net do that? How to do that? thanks before :)

Recommended Answers

All 2 Replies

See if this helps.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        '// create and customize.
        Dim myCoolTextBox As New TextBox
        myCoolTextBox.Text = "my new textbox."
        myCoolTextBox.Multiline = True
        myCoolTextBox.ScrollBars = ScrollBars.Vertical
        myCoolTextBox.Size = New Size(200, 500)
        '// add to form.
        Me.Controls.Add(myCoolTextBox)
    End Sub

wow it's work, thanks :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.