Günter Lissner
2005-09-21 11:46:28 UTC
Hallo all,
i try to adapt my windows forms editor to .NET Framework 2.0. Generally
it works, except with the "SplitContainerDesigner". If i use a
"SplitContainerDesigner" like in the following line:
aSplitContainerDesigner.Initialize(aSplitContainerComp);
an "Object reference not set to an instance of an object." exception is
thrown if the designer is initialized with a component.
Any suggestions what is wrong?
Following are a few lines of code to reproduce the behaviour:
[...]
IComponent aSplitContainerComp =
(IComponent)Activator.CreateInstance(typeof(SplitContainer));
System.ComponentModel.Design.IDesigner designer =
TypeDescriptor.CreateDesigner(aSplitContainerComp,
typeof(System.ComponentModel.Design.IDesigner));
try
{
designer.Initialize(aSplitContainerComp);
}
catch( Exception exc )
{
string Msg = exc.Message + exc.StackTrace;
}
[...]
Many thanks,
Günter Lissner
i try to adapt my windows forms editor to .NET Framework 2.0. Generally
it works, except with the "SplitContainerDesigner". If i use a
"SplitContainerDesigner" like in the following line:
aSplitContainerDesigner.Initialize(aSplitContainerComp);
an "Object reference not set to an instance of an object." exception is
thrown if the designer is initialized with a component.
Any suggestions what is wrong?
Following are a few lines of code to reproduce the behaviour:
[...]
IComponent aSplitContainerComp =
(IComponent)Activator.CreateInstance(typeof(SplitContainer));
System.ComponentModel.Design.IDesigner designer =
TypeDescriptor.CreateDesigner(aSplitContainerComp,
typeof(System.ComponentModel.Design.IDesigner));
try
{
designer.Initialize(aSplitContainerComp);
}
catch( Exception exc )
{
string Msg = exc.Message + exc.StackTrace;
}
[...]
Many thanks,
Günter Lissner