How to know which button was clicked in winforms c#? -
okay little bit tricky explain. i'm working on basic time table form. i have 7 buttons, named btnmontime , btntuetime , on till btnsuntime based on days of week. on each button click, pop window (winform) opens lets user select time through datetimepicker control. time parsed string , stored. there accept button on popup when pressed, popup closes , label beside particular day stating time posted. ` now know how 1 particular day, thing have 1 single function doing label creating. how know time button clicked place @ right place? this code come with: private void btnaccept_click(object sender, eventargs e) { formpopup.time = timepicker.value.toshorttimestring(); //label1.text = formpopup.time; label newlabel = new label(); newlabel.text = formpopup.time; newlabel.location = new system.drawing.point(205 + (100 * formtimetable.cmontime), 78); formtimetable.cmontime++; newlabel.size = new system.drawing.size...