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 6205819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:20:21+00:00 2026-05-24T05:20:21+00:00

Is it possible to determine using VB.NET whether a certain event has any handlers

  • 0

Is it possible to determine using VB.NET whether a certain event has any handlers attached to it? I don’t own the event, in this particular case I want to know which of the items in a Windows.Forms.MenuStrip have their ToolstripMenuItem.Click event handled.

  • 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-24T05:20:22+00:00Added an answer on May 24, 2026 at 5:20 am

    I don’t think this is possible without creating your own eventing structure, or possibly using reflection to get at private compiler implemented members.

    I just compiled a small snippet and ran it through Reflector.

    Original code

           RemoveHandler d.CollectionChanged, AddressOf DestinationsChanged
           AddHandler d.CollectionChanged, AddressOf DestinationsChanged
    

    What ended up in reflector

         Me.$STATIC$get_Destinations$200126C$d.remove_CollectionChanged(New NotifyCollectionChangedEventHandler(Me, DirectCast(Me.DestinationsChanged, IntPtr)))
         Me.$STATIC$get_Destinations$200126C$d.add_CollectionChanged(New NotifyCollectionChangedEventHandler(Me, DirectCast(Me.DestinationsChanged, IntPtr)))
    

    Notice that .net appears to make use of some compiler generated observable collections to track the events.

    You +might+ be able to use reflection to reach into the class and retrieve those internally defined collections, then enumerate their contents, but I’ve never tried it.

    Another option might be to roll your own event handling structure for the event in question.

    Check this article out for more on that.

    http://www.codeproject.com/KB/cs/EventChain.aspx

    To investigate further, I’d highly recommend grabbing a copy of Reflector.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to determine if the machine has IPV6 enabled using any Java
Is it possible to determine programatically whether any background applications/services are using the sattelite
Using WCF RIA Services, how is it possible to determine if a record is
Greeting, how is possible to determine from captured packets using sharppcap if the packet
Is it possible to determine when a ChucK child shred has finished executing if
Is it possible to determine if an ASP.NET page is a postback from javascript?
I am not sure whether it is possible to achieve this kind of implementation
in C# it is possible by using reflection to determine parameter types of some
I would like to determine, from a .NET application, whether the current user (from
I'm using a COM library in .NET. The vendor has provided primary interop assemblies

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.