• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 174
  • Last Modified:

UserControl control announcement to parent....


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,

Ramesh Srinivas
Ramesh Srinivas
1 Solution
Bob LearnedCommented:
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

Ramesh SrinivasTechnical ConsultantAuthor Commented:
Sorry for the delay and Thanks for the code!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now