Home All Groups Group Topic Archive Search About
Author
28 Jun 2005 2:52 AM
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))

Author
28 Jun 2005 5:57 AM
Herfried K. Wagner [MVP]
"TJS" <nospam@here.com> schrieb:
> 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
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>