Re: Form inheritence
- From: "Alan T" <alanpltseNOSPAM@xxxxxxxxxxxx>
- Date: Fri, 10 Nov 2006 13:36:28 +1100
Hi,
Now I have a problem in creating an inherited form.
I created a Class Library and a base form in it, then want to add a new form
inherited from that base form.
VS 2005 ask me about the base form but only limited to a dll. If I choose to
inherit from the base form then it cannot let me thro the process, only
select a dll.
"Bruce Wood" <brucewood@xxxxxxxxxx> wrote in message
news:1162926497.531741.43020@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
You can edit the definitions that Visual Studio Designer inserts into
your .cs file. Or, if you're using .NET 2.0, you'll have to find the
other half of your Form's partial class, the half written by Visual
Studio. If you close the Designer, change things from private to
protected in code and then restart the Designer, all should be well.
Within the Designer itself... well, it's select, change, select,
change, ....
Alan T wrote:
Thanks Bruce.
I just what would happen if I have up to hundred controls in my ancestor
form and need to change it to Proteced manually.
Is that any shortcut to change the controls from private to proteced ?
"Bruce Wood" <brucewood@xxxxxxxxxx> wrote in message
news:1162885552.625704.199700@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Alan T wrote:
Hi,
Yes now I can create a inherited form.
However, it seems does not allow me to move the controls in my
inherited
form.
I got a groupbox and would like to add another text box inside this
groupbox
but it does allow me to.
You need to change the Protection setting of the controls on the base
form from Private (the default) to at least Protected so that they are
changeable by inheriting forms.
.
- References:
- Form inheritence
- From: Alan T
- Re: Form inheritence
- From: Will
- Re: Form inheritence
- From: Alan T
- Re: Form inheritence
- From: Bruce Wood
- Re: Form inheritence
- From: Alan T
- Re: Form inheritence
- From: Bruce Wood
- Form inheritence
- Prev by Date: Re: EventLog woes
- Next by Date: Re: How to fire an event
- Previous by thread: Re: Form inheritence
- Next by thread: Examples, homework for novice trainee ?
- Index(es):
Relevant Pages
|