CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Event handler

  1. #1
    Join Date
    Oct 2002
    Location
    Torture chamber
    Posts
    132

    Event handler

    just wondering if we can make an event handler call another event handler.

    MyButton.clicks += new EventHandler(MyButton_Click);

    //how do we make MyButton_Click() call yet another MyButton_Click2()?

    because if I use MyButton.clicks += new EventHandler(MyButton_Click2()), it does not guarantee that MyButton_Click will execute before MyButton_Click2.

    What advice do you have?
    end------------------------------
    Programmers aren't born, but are made from hardwork, effort and time.
    To be a good one, requires more effort and hardwork.
    Therefore N quality programmer = (N*hardwork)+(N*effort)+(N*time)

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    from your question looks like you want to invoke an event with in an event.
    you will need to pass the sender object and the event object.

    plz specify the question and expected answer further to help your needs.

    -Paresh
    - Software Architect

  3. #3
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    and also to add plz check design patterns with menu , buttons etc and event handling with it on MSDN


    Paresh
    - Software Architect

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured