0

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?

M.Babcock
  • 18,753
  • 6
  • 54
  • 84
integra753
  • 271
  • 1
  • 5
  • 19

1 Answers1

0

If the C DLL is not available to Visual Studio at design-time you either need to put it in a place where Visual Studio can find it or add code to your control to check if you are in design mode and avoid making calls to the DLL.

Jim Rhodes
  • 5,021
  • 4
  • 25
  • 38