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

UserControl control announcement to parent....

Hello,

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,

KS
0
Ramesh Srinivas
Asked:
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

Bob
0
 
Ramesh SrinivasTechnical ConsultantAuthor Commented:
Sorry for the delay and Thanks for the code!
0

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