Neven Draskovic

Neven Draskovic

  • NA
  • 117
  • 140.3k

Communication between User Controls and main form

Apr 17 2012 8:38 AM
Hey

I'm making an application that might have a lot of user controls (I think it is best option for organizing the quantity of controls that I will need). The main form will be used only as a container so to say. My question is how can I use one user control to create another inside a panel container in the main form?
I tried to make the panel public and then by using panel1.Controls.Add(control) create the new control, but every time I try to run that project my VS crashes. Do you know whats causing this?