G
Guest
I am using vb.net and basically I am trying to build a series of buttons at
runtime based on menu entries created at design time on a ContextMenuStrip
What I would like to do is make the Click event of a button created at
runtime execute the same event handler as the Click event of the
ToolStripMenuItem.
so in pseudo code
newButton.OnClick = menuItem.OnClick
I wondered is this possible via reflection to get the event handlers address
to use in an AddHandler call for the button, but I am not sure how to go
about this.
Thanks Adrian
runtime based on menu entries created at design time on a ContextMenuStrip
What I would like to do is make the Click event of a button created at
runtime execute the same event handler as the Click event of the
ToolStripMenuItem.
so in pseudo code
newButton.OnClick = menuItem.OnClick
I wondered is this possible via reflection to get the event handlers address
to use in an AddHandler call for the button, but I am not sure how to go
about this.
Thanks Adrian