Posted on 2012-03-15
So, I decided to add my 2nd ever user control to a project I have been working on in the last few days...
On my main form, I have serveral buttons that are added to the form dynamicly during runtime. When one of these buttons is pressed, I would normaly have opened another form, and then would have "Access" to all of the fields on the main form.
However, if I just show a user control, I have not been able to figure out how I could access those other controls from the UC. There is a lot of code I would need to do on this.. Look up some values in a database, based upon certain values found on the main form. Add fields and controls at runtime, based upon those values found in the database. etc.
Is it possible? or am I better off just using a seperate form.
What are some of the pro's and con's of using a User Control vs a seperate "Form".
Re-useability is one I can see.