UserControl control announcement to parent....

Posted on 2006-04-07
Last Modified: 2012-05-05

I have just started playing around with VS 2005.

Can a combobox in a UserControl *announce* to the holding form that it's selectedIndex has changed?

If so, how can I set this up - will increase points for sample code.

thanks in advance,

Question by:saleek
    LVL 96

    Accepted Solution

    Define an event for the UserControl:

      Public Event SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)

    Raise an event:

       Private Sub OnSelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged

         RaiseEvent SelectedIndexChanged(sender, e)

      End Sub

    LVL 11

    Author Comment

    Sorry for the delay and Thanks for the code!

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now