Basically, it is just a matter of first, make sure the sender is a button type, then cast sender as a button, then you have the originating button at your disposal.
Looking for something like this ?
private void button1_Click(object sender, EventArgs e)
if (sender is Button)
Button btn = (Button)sender;
MessageBox.Show(btn.Name + " pressed");
btn.Text = "MeHo";
if (btn == button2) // something special if it was from button2
btn.Text += "-2";
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...