Error Creating new Button

  • Thread starter Thread starter Adam Maltby
  • Start date Start date
A

Adam Maltby

Hi,

I am creating some buttons for a form using:

Private btn_Authenticate As System.Windows.Forms.Button = New Button
Me.btn_Authenticate.Location = New Point(300, (Me.Height - 100))
AddHandler Me.btn_Authenticate.Click, AddressOf Me.btn_Authenticate_Click
Me.Controls.Add(Me.btn_Authenticate)

But I get the err on the AddHandler (It puts underline on Me.btn_Authenticate_Click):
'btn_Authenticate_Click' is not a member of 'FRF.Form1'

I have created other buttons on this same project and they are all the same (with diff names) all of which work fine.

Any ideas?

Cheers
Adam
 
Never mind - I was being a divvy.
What I forgot from earlier button implementations is that it will chuck up an error until I put in a sub for the click event itself!
Duh me!

Adam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top