S
stony via .NET 247
I try to create a new form instance during runtime using the compact framework. My constructor has an argument. It is possible
to compile it, but during runtime I get following exception: 'System.NotSupportedException'.
The code:
Type type = Type.GetType( "WMSRF.MyForm", true );
object[] args = new Object[] {myArgument};
Form x1 =(Form)type.InvokeMember(null, BindingFlags.Instance |
BindingFlags.Public | BindingFlags.CreateInstance, null,
null, args, null, null, null);
x1.show();
Thanks for your help.
stony
to compile it, but during runtime I get following exception: 'System.NotSupportedException'.
The code:
Type type = Type.GetType( "WMSRF.MyForm", true );
object[] args = new Object[] {myArgument};
Form x1 =(Form)type.InvokeMember(null, BindingFlags.Instance |
BindingFlags.Public | BindingFlags.CreateInstance, null,
null, args, null, null, null);
x1.show();
Thanks for your help.
stony