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 / Design Time / May 2004

Tip: Looking for answers? Try searching our database.

Designer properties of a control losing/resetting values when placed on a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frustrated - 27 May 2004 14:03 GMT
I have developed a number of custom control components and given them a number
of design time properties. Serialisation works most of the time but sometimes
after building, certain properties will magically reset to their default values
... even though the code in the InitializeComponent call says it is still there
!!!

Seems to be happening on enumerations alot more as the project grows.

It doesn't happen all the time but when it starts to happen it doesn't go away
... Usually that form the control is being used on will do it for ever.

We all know that the 2003IDE is a little unstable but what the hell is going on
here.

Only a Microsoft guru will be able to shed some light on this one.

All the attributes are being applied ... hey it works mostly but sometimes
things just go weird.
Kitchen Bin - 28 May 2004 06:08 GMT
Dear Mr.Frustrated
I am having the exact same problem and would also love an answer to
this.  To recap, I create or inherit from a control and then add my
own simple enum property.  It works fine most the time but for some
instances of the control the IDE will constantly keep reseting the
property.  Currently I have to hard-code the values into my code to
keep the enum settings on the property which therefore kinda makes the
visual editor useless.

Please has someone got an answer?

> I have developed a number of custom control components and given them a number
> of design time properties. Serialisation works most of the time but sometimes
[quoted text clipped - 14 lines]
> All the attributes are being applied ... hey it works mostly but sometimes
> things just go weird.
Helper - 28 May 2004 12:29 GMT
Just a thought...are your enums declared inside of a class? They have to be
inside a namespace for VS.NET IDE to work with them.

> I have developed a number of custom control components and given them a number
> of design time properties. Serialisation works most of the time but sometimes
[quoted text clipped - 14 lines]
> All the attributes are being applied ... hey it works mostly but sometimes
> things just go weird.
Frustrated 2 - 29 May 2004 01:30 GMT
Spot On ... but where is that in the docs ? I suppose one can argue that it is
inbetween the lines.

For those who are an object purist, encapsulated enums in a class require you to
do a lot more work I have since found out !

Appreciate the response.

>Just a thought...are your enums declared inside of a class? They have to be
>inside a namespace for VS.NET IDE to work with them.
[quoted text clipped - 23 lines]
>> All the attributes are being applied ... hey it works mostly but sometimes
>> things just go weird.

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.