469,924 Members | 1,361 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,924 developers. It's quick & easy.

Question about Inherit UserControl

Hi,

I created an Inherit UserControl which inherits textbox
with additional property say 'Type'. I used in my forms
and everything works fine. But afterward, I want to
remove (or rename) such property. I find that the auto
inserted code (InitializeComponent) for that UserControl's
property doesn't get update, and I got tons of errors from
wherever I referenced it. Do I need to manually update
InitializeComponent module in every single form that used
UserControl? Or there's other work around?

Please help, Thanks.
Nov 20 '05 #1
8 1536
Try deleting the control from the forms and then re-adding it.

Hi

I created an Inherit UserControl which inherits textbox
with additional property say 'Type'. I used in my forms
and everything works fine. But afterward, I want to
remove (or rename) such property. I find that the auto
inserted code (InitializeComponent) for that UserControl's
property doesn't get update, and I got tons of errors from
wherever I referenced it. Do I need to manually update
InitializeComponent module in every single form that used
UserControl? Or there's other work around?

Please help, Thanks.

Nov 20 '05 #2
Try deleting the control from the forms and then re-adding it.

Hi

I created an Inherit UserControl which inherits textbox
with additional property say 'Type'. I used in my forms
and everything works fine. But afterward, I want to
remove (or rename) such property. I find that the auto
inserted code (InitializeComponent) for that UserControl's
property doesn't get update, and I got tons of errors from
wherever I referenced it. Do I need to manually update
InitializeComponent module in every single form that used
UserControl? Or there's other work around?

Please help, Thanks.

Nov 20 '05 #3
Thanks for reply.

That will work, but the problem is I have 150+ forms and
more than one UserControls on each form. It could be an
overhead if any change need to remove/add/rename all one
by one.
-----Original Message-----
Try deleting the control from the forms and then re- adding it.
Hi

I created an Inherit UserControl which inherits textbox
with additional property say 'Type'. I used in my forms and everything works fine. But afterward, I want to
remove (or rename) such property. I find that the auto
inserted code (InitializeComponent) for that UserControl's property doesn't get update, and I got tons of errors from wherever I referenced it. Do I need to manually update
InitializeComponent module in every single form that used UserControl? Or there's other work around?

Please help, Thanks.

.

Nov 20 '05 #4
Thanks for reply.

That will work, but the problem is I have 150+ forms and
more than one UserControls on each form. It could be an
overhead if any change need to remove/add/rename all one
by one.
-----Original Message-----
Try deleting the control from the forms and then re- adding it.
Hi

I created an Inherit UserControl which inherits textbox
with additional property say 'Type'. I used in my forms and everything works fine. But afterward, I want to
remove (or rename) such property. I find that the auto
inserted code (InitializeComponent) for that UserControl's property doesn't get update, and I got tons of errors from wherever I referenced it. Do I need to manually update
InitializeComponent module in every single form that used UserControl? Or there's other work around?

Please help, Thanks.

.

Nov 20 '05 #5
"Issac" <an*******@discussions.microsoft.com> schrieb
Hi,

I created an Inherit UserControl which inherits textbox
with additional property say 'Type'. I used in my forms
and everything works fine. But afterward, I want to
remove (or rename) such property. I find that the auto
inserted code (InitializeComponent) for that UserControl's
property doesn't get update, and I got tons of errors from
wherever I referenced it. Do I need to manually update
InitializeComponent module in every single form that used
UserControl? Or there's other work around?


In general, you should never change property names or other public items
after the class has been released, but as you already did, I think
Find&Replace (confirming each item found) is your friend.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #6
"Issac" <an*******@discussions.microsoft.com> schrieb
Hi,

I created an Inherit UserControl which inherits textbox
with additional property say 'Type'. I used in my forms
and everything works fine. But afterward, I want to
remove (or rename) such property. I find that the auto
inserted code (InitializeComponent) for that UserControl's
property doesn't get update, and I got tons of errors from
wherever I referenced it. Do I need to manually update
InitializeComponent module in every single form that used
UserControl? Or there's other work around?


In general, you should never change property names or other public items
after the class has been released, but as you already did, I think
Find&Replace (confirming each item found) is your friend.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #7
You need to rename/remove manually

Still can use Search and Replace :)

Issac wrote:
Hi,

I created an Inherit UserControl which inherits textbox
with additional property say 'Type'. I used in my forms
and everything works fine. But afterward, I want to
remove (or rename) such property. I find that the auto
inserted code (InitializeComponent) for that UserControl's
property doesn't get update, and I got tons of errors from
wherever I referenced it. Do I need to manually update
InitializeComponent module in every single form that used
UserControl? Or there's other work around?

Please help, Thanks.


Nov 20 '05 #8
You need to rename/remove manually

Still can use Search and Replace :)

Issac wrote:
Hi,

I created an Inherit UserControl which inherits textbox
with additional property say 'Type'. I used in my forms
and everything works fine. But afterward, I want to
remove (or rename) such property. I find that the auto
inserted code (InitializeComponent) for that UserControl's
property doesn't get update, and I got tons of errors from
wherever I referenced it. Do I need to manually update
InitializeComponent module in every single form that used
UserControl? Or there's other work around?

Please help, Thanks.


Nov 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Chris | last post: by
6 posts views Thread by Mohammad-Reza | last post: by
reply views Thread by Issac | last post: by
5 posts views Thread by Jim Hubbard | last post: by
3 posts views Thread by Station Media | last post: by
3 posts views Thread by Guillaume Hanique | last post: by
7 posts views Thread by John D'oh | last post: by
2 posts views Thread by Joe | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.