I'm writing a program that will be a form with a button on it. When I click on the button, I want the old button to disappear and be replaced with a new one in it's place. So far, only the button will disappear. I've tried copying a the code straight out of the book, but still having problems.
I've also tried replacing the variable statement at the top with:
I had seen this in other posts, still no results. Suggestions?
VB.NET:
Dim btnTouch As New Button()
Private Sub btnStop_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnStop.Click
btnStop.Visible = False
Button1.Visible = False
btnTouch = New Button()
btnTouch.Location = New Point(152, 104)
btnTouch.Size = New Size(180, 23)
btnTouch.Visible = True
btnTouch.text = "New Button"
End Sub
VB.NET:
Dim WithEvents btnTouch as Button()