Chrispy360
October 1st, 2009, 04:06 PM
Hi Guys,
I have made a class which creates a button depending on what data i send to the sub.
When i send the information, eg: Name, Text, etc, I give it a string which i want to be the addressOf the created button for example
Dim ButtonClickEventSub as string ' Similar variable is brought in
AddHandler ButtonObject , AddressOf ButtonClickEventSub 'This doesn't work but is sort of what i want.
Unfortunately the sub is also in the form so i think it needs to be reference some how like: Form1.ButtonClickEventSub
Thanks in advance
Chris
I have made a class which creates a button depending on what data i send to the sub.
When i send the information, eg: Name, Text, etc, I give it a string which i want to be the addressOf the created button for example
Dim ButtonClickEventSub as string ' Similar variable is brought in
AddHandler ButtonObject , AddressOf ButtonClickEventSub 'This doesn't work but is sort of what i want.
Unfortunately the sub is also in the form so i think it needs to be reference some how like: Form1.ButtonClickEventSub
Thanks in advance
Chris