Thread: Event Handling
View Single Post
  #2 (permalink)  
Old March 10th, 2009, 07:14 AM
Apocolypse2005 Apocolypse2005 is offline
Friend of Wrox
Points: 1,075, Level: 12
Points: 1,075, Level: 12 Points: 1,075, Level: 12 Points: 1,075, Level: 12
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: , , United Kingdom.
Posts: 244
Thanks: 3
Thanked 4 Times in 4 Posts
Default The Answer

The answer i got for this thread is to use
Code:
Dim newButton AsNew Button

Public Sub load_newButton()
newButton.Text =
"Click Me"
newButton.Name = "btnClickMe"
AddHandler newButton.Click, AddressOf buttonClick
End Sub Public Sub buttonClick(ByVal sender As Object, ByVal e As EventArgs) 'Code in here End Sub
__________________
Apocolypse2005, I'm a programmer - of sorts.