click procedure for dynamically created button?

  • Thread starter Thread starter What-a-Tool
  • Start date Start date
W

What-a-Tool

"btnExit is not a member of frmMain" message in the AddHandler Line.

What do I need to do other than the AddHandler?

'Create Exit button

btnExit.Location = New Point(425, 565)

btnExit.Size = New Size(75, 30)

btnExit.Text = "Exit"

btnExit.Visible = True

AddHandler btnExit.Click, AddressOf Me.btnExit_Click

Thanks Again - Sean
 
Hello,

What-a-Tool said:
"btnExit is not a member of frmMain" message in the AddHandler
Line.

What do I need to do other than the AddHandler?

What's the problem?!
 
Back
Top