title: Which button pressed in flowlayoutpanel?
body: <p>For my current project I am adding an variable amount of <code>usercontrols : ucTask</code> to my <code>flowlayoutpanel : flpTasks</code></p>
  
  <pre><code>foreach (task t in tasks)
  {
     ucTask uct = new ucTask();
     uct.id = t.task_id;
     uct.date= t.date.ToString();
     uct.btnNaam = t.task_id.ToString();
  
     uct.OnButtonclick += new EventHandler(uct_OnButtonclick);
  
     flpTasks.Controls.Add(uct);
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/3NrqB.png" alt="ucTask"></p>
  
  <p>Now I will have a couple of those usercontrols in the flowlayoutpanel, and I want to fire an event when I press that button. With the <code>EventHandler</code> I can fire an event, but I need to fire a different event for a different button.</p>
  
  <pre><code>    void uco_OnButtonclick(object sender, EventArgs e)
      {
          lblStatus.Text = "TEST";
      }
  </code></pre>
  
  <p>I don't know how to know which button (or usercontrol) I pressed. And I'm out of ideas, any suggestions?</p>
  
  <p>Thanks,
  Thomas</p>