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 / July 2006

Tip: Looking for answers? Try searching our database.

TextBox inheritance

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stephen Ahn - 24 Jul 2006 08:03 GMT
Using dotnet 1.1.

Say I have assembly "A" with a drived textbox like this :

public class MyTextBox: TextBox
{
 public MyTextBox(): base()
 {
  this.BackColor = System.Drawing.Color.AliceBlue;  // XXX
 }
}

Assembly "A" is compiled.

Say I have a windows form in application "B", onto which I drop "MyTextBox".
The text box shows up in AliceBlue, as expected, at both design time and
runtime.

Now, later on, say line XXX at assembly "A" is changed, to this :

this.BackColor =  System.Drawing.Color.Brown;

Assembly "A" is compiled again.

Now, if I open up the form in application "B", is it possible for the the
textbox to reflect the changes made to assembly "A", without having to
remove the control and add it again ? i.e. so that the textbox automatically
shows up as brown.

What are the general approaches to doing this kind of thing ? Or is this
something that can't be done ?

TIA,
Stephen
Christian Fleischhacker - 24 Jul 2006 09:15 GMT
Stephen Ahn < schrieb:
> Using dotnet 1.1.
>
[quoted text clipped - 30 lines]
> TIA,
> Stephen

you could try to clean the solution and recompile everything (maybe you
have to do this more than once) this behavior still shows up in 2.0
Framework from time to time

Rate this thread:







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.