Hi
I understand how to create a button in runtime in vb.net
my code to do this is:
' create button
Dim btn As New Button
' set some button properties
btn.Text = "go"
btn.Top = 45
btn.Left = 190
'add button to form
Me.Controls.Add(btn)
I read on a forum from daniweb that I should add a handler to my button. This is the part I am struggeling with. I dont know how to add the handler or how to use the handler
Add the handler:
the code information I looked up showed that the handler should be something in the lines of:
AddHandler btn.Click, AddressOf Me. ????
im not sure what should be entered where I inserted the ????
Use the handler:
Ferthermore I am not sure on how to use this button once it has a handler attached
so to do somethin simple lets just say I want to open a new form with the button
the code wil be:
dim frm as new Form2
frm.show()
How do I call the handler to implement this code?