
Signature
Andrew Cutforth - AJC Software - www.ajcsoft.com
The best folder synchronize and directory compare tool available.
AJC Active Backup instantly archives every file you edit giving you
unlimited undo and automatic revision control. Never lose your data again.
Hi Andrew,
Yes, it's possible to prevent certain code from being executed at
Design-time. The reason for this is that the Controls need to be painted at
Design time, and some logic may be involved in the process. This is a very
simple explanation of a fairly complex topic, so I'll finish with a link to
the full reference for you.
There are certain methods that automatically execute at Design-time, such as
Constructors, InitializeComponent, and OnLoad. There are also Designers that
are involved in the Design-time code execution, and attributes as well.
Fortunately, all of this is available to us, the developers.
There is one easy way to prevent code from executing at Design time,
however. Enclose it in an "if" block:
if (!DesignMode)
{
//........
}
Fore more details and all kinds of stuff you can do with Designer classes
and attributes, see:
http://msdn2.microsoft.com/en-us/library/37899azc.aspx

Signature
HTH,
Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist
I recycle.
I send everything back to the planet it came from.
>I have created a Component called a BOConnector that implements
>IBindingList
[quoted text clipped - 25 lines]
>
> Has anyone got any ideas?
Andrew - 24 Jun 2006 21:09 GMT
Thanks for your answer Kevin, but I know all about DesignMode etc. My
question was really about why these controls are behaving is such a way with
data binding and is the only solution override this behaviour.

Signature
Andrew Cutforth - AJC Software - www.ajcsoft.com
The best folder synchronize and directory compare tool available.
AJC Active Backup instantly archives every file you edit giving you
unlimited undo and automatic revision control. Never lose your data again.
> Hi Andrew,
>
[quoted text clipped - 53 lines]
>>
>> Has anyone got any ideas?