error message

  • Thread starter Thread starter TJS
  • Start date Start date
T

TJS

how do i resolve this error message

add_click is not a member of 'system.windows.forms.button'

code:

'

'cmdCancel

'

Me.cmdCancel.Location = New System.Drawing.Point(424, 232)

Me.cmdCancel.Name = "cmdCancel"

Me.cmdCancel.TabIndex = 9

Me.cmdCancel.Text = "Cancel"

Me.cmdCancel.add_Click(New EventHandler(AddressOf Me.cmdCancel_Click))
 
TJS said:
add_click is not a member of 'system.windows.forms.button'
[...]
Me.cmdCancel.add_Click(New EventHandler(AddressOf Me.cmdCancel_Click))

Buttons do not have an 'add_Click' method.

Replace the line above with this one:

\\\
AddHandker Me.cmdCancel.Click, AddressOf Me.cmdCancel_Click
///
 

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