This should do it for you.
PictureBox cmd = new PictureBox();
cmd.Click += cmd_Click;
Then have a new function to handle the click.
void cmd_Click(object sender, EventArgs e)
{
throw new NotImplementedException();
}
To perform unique actions depending on what PictureBox was clicked you may want to give the PictureBox a name you can relate to such as a row number or unique ID of the row.
PictureBox cmd = new PictureBox();
cmd.Click += cmd_Click;
cmd.Name = y.ToString();
void cmd_Click(object sender, EventArgs e)
{
string RowID = ((PictureBox)sender).Name;
}