Thanks for the reply.
What I was really trying to accomplish was having the designer display
changes from a SetColors() function called in my form Load event handler.
Doing this:
this.SuspendLayout();
this.SetColors();
this.ResumeLayout();
partially works to set the colors of my form at design time without actually
setting the colors in the designer. However, it is far from perfect. I
just gave up on it and decided to move on.
~Greg
"Shriram narayanan" <(E-Mail Removed)> wrote in message
news:011401c35dd8$50302f00$(E-Mail Removed)...
> Greg ,
>
> I suppose, you are talking about Form based Inheritance.
>
> It is possible to provide the Visual Inheritance in .NET .
>
> Create a Parent Form (place 2 command button with back
> colors Blue and Red )
>
> Add a Child Form to that Project (through Add Inherited
> Form , menu item ) and you will see the visual properties
> of the parent form inherited to its Child .
>
> For more information , look MSDN for Visual Inheritance.
>
> Thanks
> Shriram
>
>
>
>
>
>
> >-----Original Message-----
> >My question is: How do I cause my custom code to affect
> the design-time
> >behavior of the application?
> >
> >I'm trying to standardize the colors used on all new
> forms I will create,
> >without having to set the properties by hand every time.
> >
> >I have a 2 forms, BaseForm and SubForm, with SubForm
> inheriting from
> >BaseForm.
> >In BaseForm.Load event, I loop through the controls and
> set their colors.
> >When I run SubForm, all of the controls show up with the
> proper colors,
> >which is great, but I'd like the form to look the same in
> both run-time AND
> >design-time.
> >
> >Any suggestions? Links for further reading?
> >
> >Thanks,
> >~Greg
> >
> >
> >.
> >
|