Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2005

Tip: Looking for answers? Try searching our database.

Fixing form size in design mode from base form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SteveB - 13 Feb 2005 20:07 GMT
Hi
Does anybody know of a way to fix the size of inheriting forms by setting a
size in a base form. I would like to remove the ability of developers to
change the size of a form (in design mode)  if they inherit from a particular
base form. I know you can override the SelectionRules property of a control
designer to fix a control size but it doesn't seem to work for inheriting
forms.
Keenan Newton - 13 Feb 2005 21:16 GMT
Well i suppose you could override the Size property accessors to ignore
any changes made from the inherited form.  I think that should do the
trick.  I did a similar method to prevent others from trying to change
the font of a control.
SteveB - 13 Feb 2005 23:07 GMT
Thanks for your reply Keenan, I was thinking I would have to implement my own
designer, but what you said lead me to just setting the min and max form
sizes on the base which works.

> Well i suppose you could override the Size property accessors to ignore
> any changes made from the inherited form.  I think that should do the
> trick.  I did a similar method to prevent others from trying to change
> the font of a control.
Matt Garven - 14 Feb 2005 00:15 GMT
You might want to look into the BrowsableAttribute and the
DesignerSerializationVisibilityAttribute in addition to setting the minimum
and maximum size.

Regards,
Matt Garven

> Thanks for your reply Keenan, I was thinking I would have to implement my own
> designer, but what you said lead me to just setting the min and max form
[quoted text clipped - 4 lines]
> > trick.  I did a similar method to prevent others from trying to change
> > the font of a control.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.