2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Teme64
0

AFAIK no.

Any special reason to do inheritance at the run-time and not in the design mode? What would you like to inherit from the parent form (there might be other solution than inheritance)?

0

AFAIK no.

Any special reason to do inheritance at the run-time and not in the design mode? What would you like to inherit from the parent form (there might be other solution than inheritance)?

Actually I have 2 different applications. Application1 has different theme than Application2. I m calling a form of Application2 in Application1 using reflection. I want to set theme of form of Application2 same as Application1. Is it possible? if yes then how?

0

I want to set theme of form of Application2 same as Application1

Not sure what you mean with the "theme". If you mean form's properties, like BackColor or Font, use reflection to set those properties just like you call "inherited" form's Show method. If the "theme" is something else, I would add a public SetTheme method to forms and pass the "theme" object as an argument to that method. That is, if the "theme" is an object or can be converted (serialize) to an object.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.