Hi, here is one solution (in C#) for a button click event handler. Just use the click event handler of your own control.
private void btn_click(object sender, EventArgs e)
{
Button button = sender as Button;
if(button != null)
{
MessageBox.Show(button.Text);
}
}