G
Giò
Hi at all.
I have my personal button that inherits from system.windows.forms.button, in
this way
Public Class MyButton
Inherits System.Windows.Forms.Button
..
..
Private Sub MyButton_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Click
MsgBox("This is My Button Click")
End Sub
Private Sub MyButton_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.DoubleClick
MsgBox("This is My Button DoubleClick")
End Sub
Private Sub MyButton_Resize(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Resize
MsgBox("This is My Resize")
End Sub
End Class
In a form at runtime I create a button, using the system
reflection.assembly.createInstance method, and it works fine.
So, if I click on the created button, the message "This is My Button Click"
is sent.
If I do DoubleClick the message "This is My DoubleClick" is sent.... end so
on
Now i'd want create the instance of the button, removing all events at
runtime.
So, after the creation of the new button, the events would not have more
being raises.
(click, doubleclick ... don't send nothing)
How can I do, using reflection?
I would reall appreciate your help.
Thanks in advance
(sorry for my bat English)
Giò
I have my personal button that inherits from system.windows.forms.button, in
this way
Public Class MyButton
Inherits System.Windows.Forms.Button
..
..
Private Sub MyButton_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Click
MsgBox("This is My Button Click")
End Sub
Private Sub MyButton_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.DoubleClick
MsgBox("This is My Button DoubleClick")
End Sub
Private Sub MyButton_Resize(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Resize
MsgBox("This is My Resize")
End Sub
End Class
In a form at runtime I create a button, using the system
reflection.assembly.createInstance method, and it works fine.
So, if I click on the created button, the message "This is My Button Click"
is sent.
If I do DoubleClick the message "This is My DoubleClick" is sent.... end so
on
Now i'd want create the instance of the button, removing all events at
runtime.
So, after the creation of the new button, the events would not have more
being raises.
(click, doubleclick ... don't send nothing)
How can I do, using reflection?
I would reall appreciate your help.
Thanks in advance
(sorry for my bat English)
Giò