Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6239867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:27:56+00:00 2026-05-24T11:27:56+00:00

Okay, make an example here: I have UserControl A, UserControl B, UserControl C and

  • 0

Okay, make an example here:

  1. I have UserControl A, UserControl B, UserControl C and one Windows Form.
  2. This Windows Form is only started with UserControl A.
  3. UserControl C has [Next] and [Back] buttons.
  4. Say, UserControl A is declared with an event handler. One of function in UserControl A will actually raise the event call to execute one function at UserControl C.
  5. So, at UserControl C, I have to add with

“UserControlA.OneFunction += this.UserControlC_Function;”

  1. If I click Next button at UserControl C, it will dispose the UserControl A and add new UserControl B to the Windows Form. But I never remove this event handler manually.

One of the function in UserControl A is the caller (where event is declared).
One of the function in UserControl C is the listener.

So, these are my questions:

  • Should I manually remove the handler before UserControl A disposed?
  • Will this User Control A dispose automatically remove the handler that declared previously?
  • Should I add this somewhere?

“UserControlA.OneFunction -= this.UserControlC_Function;”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:27:56+00:00Added an answer on May 24, 2026 at 11:27 am
    1. By convention, we don’t. And since no event should be invoked after disposal, there is no need to do so unless the control in question is behaving weirdly.
    2. No. At least there isn’t such code as seen from reflector.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay so basically : i have this simple example: main.cpp using namespace VHGO::Resource; std::list<BaseTable*>
Okay, I am stumped on this one and need some quick help. I have
Okay, here's the scenario. I have a utility that processes tons of records, and
Okay, I need some solid OOP advice. Here's the setup: I have a player
I have just started learning PHP, and here's my first doubt... Both of these
Okay, here's one for the pro's: For a couple of years now, i've been
Okay this is part of my search results project, in it, I have description
I have this code $(document).ready(function(){ // ... $('form').submit(function() { // ... $.ajax({ type: GET,
Still no answer...anyone have something better? Okay complex 2 part question here. I have
Okay, so here's an example scenario. There is a student resource resources :students ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.