Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Catching SelectedIndexChanged event from ListBox in UserControl added at run time in VB.NET

$
0
0

Hello. I have a standard listbox inside standard usercontrol. Data source of listbox is a collection of class with 2 fields created for Display and Member values. I add instance of this control at run time:

Private Sub Customers_Load(sender as object, e as EventArgs) handles MyBase.Load

dim ctl as new ctlCustomers

Panel1.Controls.Add(ctl)

Add Sub

This control can be added from different forms like in <Customers_Load>

 I am looking for standard way to catch event SelectedIndexChanged of listbox from different parent forms and pass parameter of selected valuemember

Thank you





Michael


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>