I write in visual basic .net
mybutton.Click = New EventHandler (AddressOf DetectedAClick
private Sub DetectedAClick(ByVal sender as object, ByVal e as EventArgs
I produced an erron in executing mode, its say: An unhandled exception of type "System.InvalidCastException' ocurred i
microsoft.visualbasic.dll. Additional information: Specific cast is not valid
Do you know what is the problema
Thank
----- Mathieu Chavoutier wrote: ----
"Silvia" <an*******@discussions.microsoft.com> a écrit dans le message d
news:D2**********************************@microsof t.com..
Hi I have a form and I add buttons programmatically in de form_Load function
Anybody know how implements de function button_click if in the designe
mode the button doesn't exists
Inside the function that create the button
myButton.Click += new EventHandler(iHabeDetectedAClick)
Then, create the function
private void iHabeDetectedAClick(object sender, EventArgs e
System.Console.WriteLine(The Click Was Detected)