problem with exporting a customized form from dll

Posted by mavric on Stack Overflow See other posts from Stack Overflow or by mavric
Published on 2010-04-05T18:08:33Z Indexed on 2010/04/05 18:13 UTC
Read the original article Hit count: 180

Filed under:
|
|
|

I'm working on an application so i have write an dll which contain a form with some additional work and methods. so in the beginning of my program the thread launch this form (from my dll) to get some informations and then hide it and initialize some components and the application form and then show it. when the thread come the line where it define new instance of the exported form

"MyForm inputform = new MyForm();"

it throw an Exception called "Top-level control cannot be added to a control." so i don't know what to do ?!!. i tried to take the code of the form from the dll source code and put it in the main program and it works.... .but still i want to know what happen and what impede my application from run that form from my dll. thanks.

© Stack Overflow or respective owner

Related posts about visual-studio-2008

Related posts about c#