Hello!

I load a Form with this command:
myForm = (MyForm)Activator.CreateInstance(formType);

Everything works fine and the Form opens. But in the debugger of
Visual Studio 2005 (Microsoft Device Emulator V2), you can see 20(!)
times this message:
German: "Eine Ausnahme (erste Chance) des Typs
"System.UnauthorizedAccessException" ist in mscorlib.dll aufgetreten"
English: "A first chance exception of type
'System.UnauthorizedAccessException' occurred in mscorlib.dll"

What is this for a message? What is going wrong?

Thank you very much for your help!
Manfred Denzer

Re: UnauthorizedAccessException while opening forms with by Manfred

Manfred
Mon Jul 14 05:26:05 CDT 2008

I think, I found the answer... A first chance exception is nothing out
of the ordinary and my code should be ok:
http://blogs.msdn.com/davidklinems/archive/2005/07/12/438061.aspx