简体   繁体   中英

Custom User Control crashes form

I have C# control derived from UserControl. When I close the design view of a form incorporating this control Visual Studio crashes. On XP I get the opportunity to debug the crash and I can see it is throwing a DLL not found exception on an API in a C dll. If I comment out the call to this function it stops the crash. Is closing the design view actually calling my dispose method? Why am I getting the DLL (or entry point) not found exception and what should I do to stop this happening?

如果C DLL在设计时对Visual Studio不可用,则需要将其放在Visual Studio可以找到它的位置,或者将代码添加到控件中以检查您是否处于设计模式,并避免调用DLL。 。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM