PC Review


Reply
Thread Tools Rate Thread

Basic Inheritence Question

 
 
Eric Lemmon
Guest
Posts: n/a
 
      20th Aug 2004
Hi,

I created a base form and several forms inheriting from the base. I just
found that all the forms need to be wider, so I increased the width of the
base form. After recompiling, none of the inherited forms adopted this new
width.

Is there any way to force the inherited forms to reflect any changes made in
the base form? Also, can I make the Size property of the base property
Read-Only, so that the inherited forms have no control over their size?

(If possible, I'd like to avoid changing the Windows Form Designer generated
code.)

Thank you,

Eric





 
Reply With Quote
 
 
 
 
One Handed Man \( OHM - Terry Burns \)
Guest
Posts: n/a
 
      20th Aug 2004
For the inhertited forms, make alter this in the designer code.

Me.ClientSize = MyBase.Size


--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Eric Lemmon" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I created a base form and several forms inheriting from the base. I just
> found that all the forms need to be wider, so I increased the width of the
> base form. After recompiling, none of the inherited forms adopted this

new
> width.
>
> Is there any way to force the inherited forms to reflect any changes made

in
> the base form? Also, can I make the Size property of the base property
> Read-Only, so that the inherited forms have no control over their size?
>
> (If possible, I'd like to avoid changing the Windows Form Designer

generated
> code.)
>
> Thank you,
>
> Eric
>
>
>
>
>



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      20th Aug 2004
* "One Handed Man \( OHM - Terry Burns \)" <news.microsoft.com> scripsit:
> For the inhertited forms, make alter this in the designer code.
>
> Me.ClientSize = MyBase.Size


Or completeley remove the line...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
 
Reply With Quote
 
One Handed Man \( OHM - Terry Burns \)
Guest
Posts: n/a
 
      20th Aug 2004
Yep that'll do it as well, however, leaving it in is more explicit.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> * "One Handed Man \( OHM - Terry Burns \)" <news.microsoft.com> scripsit:
> > For the inhertited forms, make alter this in the designer code.
> >
> > Me.ClientSize = MyBase.Size

>
> Or completeley remove the line...
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>



 
Reply With Quote
 
Eric Lemmon
Guest
Posts: n/a
 
      20th Aug 2004
Well, that was easy. Thanks for the quick replies, Terry & Herfried.

Out of curiosity, is there a way to do this without altering the inherited
forms, only the base form?

Thank you,

Eric

"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:(E-Mail Removed)...
> For the inhertited forms, make alter this in the designer code.
>
> Me.ClientSize = MyBase.Size
>
>
> --
>
> OHM ( Terry Burns )
> . . . One-Handed-Man . . .
> If U Need My Email ,Ask Me
>
> Time flies when you don't know what you're doing
>
> "Eric Lemmon" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> >
> > I created a base form and several forms inheriting from the base. I

just
> > found that all the forms need to be wider, so I increased the width of

the
> > base form. After recompiling, none of the inherited forms adopted this

> new
> > width.
> >
> > Is there any way to force the inherited forms to reflect any changes

made
> in
> > the base form? Also, can I make the Size property of the base property
> > Read-Only, so that the inherited forms have no control over their size?
> >
> > (If possible, I'd like to avoid changing the Windows Form Designer

> generated
> > code.)
> >
> > Thank you,
> >
> > Eric
> >
> >
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
inheritence question ^MisterJingo^ Microsoft C# .NET 11 15th Aug 2006 04:38 PM
Inheritence question Ron M. Newman Microsoft Dot NET 2 8th Aug 2006 04:42 PM
Re: A question on Inheritence in C# Mattias Sjögren Microsoft C# .NET 0 7th Mar 2005 08:58 PM
Re: A question on Inheritence in C# Howard Swope Microsoft C# .NET 0 7th Mar 2005 08:55 PM
Re: A question on Inheritence in C# Samuel R. Neff Microsoft C# .NET 0 7th Mar 2005 08:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:19 AM.