Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The type specified in the error message has no event of that name. The example below attempts to call an unsupported event.
Private Sub Button1_Chew(ByVal sender as Object, ByVal e as System.EventArgs) Handles Button1.Chew
End Sub
Note
C# users will not get an error with the following code:
private void button1_Chew(object sender, System.EventArgs e)
{
}
However, adding a line of code similar to the following to wire up the event handler will raise the error "System.Windows.Forms.Button does not contain a definition for Chew":
button1.Chew += new System.EventHandler(this.button1_Chew);
To correct this error
- Use an event that is supported by that type.
See Also
Tasks
How to: Create Event Handlers at Run Time for Windows Forms