UnauthorizedAccessException while opening forms withActivator.CreateInstance

  • Thread starter Thread starter Manfred Denzer
  • Start date Start date
M

Manfred Denzer

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
 
Back
Top