473,326 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Problem with visual inheritance in VS2005 designer

Hi!

I have run into a problem with visual inheritance using the VS2005 designer
for Windows Forms.

My goal is to put business logic and common rules for our controls into its
own layer (base classes) so that future changes in these controls are managed
by just modifying this custom layer, and not all the controls of a particular
type.

This is the situation:
I've created my own custom library project with controls providing some
business rules, e.g a GridViewControl which is customized. When - in my
application project - building forms using grid controls that inherits from
my custom GridViewControl it first seems OK. But when I in the designer move
the inherited control to a different position on the form, properties-values
from the custom control (base-class) that are not-default (modified by me)
are generated/copied into the forms "InitializeComponent" method.
And; here comes the unwanted effect:
This means that if I later on change the value of these properties in the
base-class, the inherited controls will not notice these changes, because of
the previous "copy"-operation from the base class to the child class.

Is there any way that I can prevent properties set in the base class from
being copied to the "InitializeComponent"-method in the application Form when
using the Forms designer (e.g. when moving the control to another position)?

Thanks,
Helge
Apr 16 '07 #1
0 1155

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jason Hickey | last post by:
Has there been a change in the way the UI designer handles winform inheritance in the 2003 version of visual studio. Consider the following (try it if you are using 2003 Everything seems to work...
6
by: Benson | last post by:
I build up a parent form and inherited to a child form. Initially, parent form has a button with an image, so a child form has. Later I change the button's image, but the child form cannot refresh...
4
by: fahimrauf | last post by:
Hy Friends, Using visual inheritance feature of .net, I've inherited a Form (Form2) from an existing form (Form1) of the same assembly or project. It's perfectly inherited and when I run the...
16
by: Bill Nguyen | last post by:
I'm running into a very weird problem regarding subtraction. Subtraction behaves as if it's an addition in the below sub txtJacoCost.Text = Format(mRackc - (mDisc + mJaEc), "0.#####0") ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.