Hello:
I have a generic form that has most of the standard changes that I need in it. I would like ot copy it into my project and then change a few things in it.
What would be the best and simplest way? I tried that 'Inherited Form' thing, but it locks all the objcets on the form. Am I doing something wrong or should I not use that?
((Hope I explained it correctly... Also I am a super newbie to this stuuf, so dont assume I some stuff.))
Loading
Sam HobbsPosted Feb 24, 2010, 5:11 PM
Attached is a simple project I put together quickly. It is a proof-of-concept showing it is possible. If there is a reason that a UserControl does not satisfy your requiements, then I don't know what that is. I realize that you also might not know what you need that a UserControl does not do, so that is why it would help for you to learn about UserControls; it is time worth investing.
kiran kumarPosted Feb 24, 2010, 12:14 PM
you must have populated your form with usercontrols
change the usercontrols modifiers from private to protected (you can see modifiers under usercontrol's properties) it unlocks the controls in the inherited form
hope it resolves your problem
MARK THE ANSWER IF IT HELPS YOU
GustavoPosted Feb 24, 2010, 9:38 AM
I need to have a form that has some things pre-set, so I dont have to add them every time I want a new form. Some items are listed below:
Form size, menuStrip, toolStrip, statusbar, tabControl, groupBox... ands some labels and textBox.
I themwould want the option to change the above items and also add new items on the form.
Hope I explained it correctly.
Sam HobbsPosted Feb 23, 2010, 10:38 PM
Here is an important question. What does "change a few things in it" really mean? Will you add controls or do you need to change the way some controls work or do you need to replace some controls?
One possibility would be to make the form a UserControl. A UserControl can have multiple controls in it. Then you can add the UserControl to other forms. Depending on your requirements, that might be the easiest and most flexible solution.