You're already creating the button in your code. So when you create the button, just attach an event handler to it. You can use the same eventhandler for all the buttons.
Something like
...
Button button = new Button();
button.Size = new Size(128,128);
button.BackColor = Color.Transparent;
button.Click += new System.EventHandler(dynamicbutton_Click);
...
and then in the same class you would have the event handler
void dynamicbutton_Click(object sender, EventArgs e) {
}
If you need, you can add some identification to Tag property to distinguish the buttons fro each other once they are clicked. See
Control.Tag Property (System.Windows.Forms)[
^]