UnauthorizedAccessException while opening forms withActivator.CreateInstance

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top