Detect on which Button click the new form opened

2 posts, 0 answers
  1. rajiv
    rajiv avatar
    1 posts
    Member since:
    Jan 2013

    Posted 02 Jan 2017 Link to this post

    Hello everyone,

    I'm stuck with a small obstacle and I don't know how to get pass it.

    I have 2 WinForms

    Forms 1 has 3 Buttons. All of them call Form2. Now in Form 2 have to I have to perform task depending on which button was clicked on Form1. how do I find it out which button called the from2 when i'm in form2?

    please help

    thanks in advance.

  2. Hristo
    Admin
    Hristo avatar
    1520 posts

    Posted 02 Jan 2017 Link to this post

    Hi Rajiv,

    Thank you for writing.

    You can open the form by passing a different parameter in its constructor depending on the clicked button. Please check the following thread discussing a similar matter: http://stackoverflow.com/questions/4247807/passing-variable-between-winforms.

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top