i have one list box in which i have shown all the names of the forms in my project using the following code:
private void PopulateForms()
{
List<_class.AppForm> list = new List<_class.AppForm>();
Type formType = typeof(Form);
foreach (Type t in Assembly.GetExecutingAssembly().GetTypes())
{
if (formType.IsAssignableFrom(t))
list.Add(new _class.AppForm() { id = t.FullName, FormName = t.Name });
}
//add form name to to lst_Form
lst_Foms.DataSource = list;
lst_Foms.ValueMember = "id";
lst_Foms.DisplayMember = "FormName";
}
my question is that i want to show the controls of each form in another listbox by selecting each form in listbox1. can some body guide how to acheive that? thanks.