By trial and error I early found working in Visual Studio 2005/VB.NET that I needed to add the working folder (C:\Program Files\AutoCAD 2007) to the Working directory in Properties>Debug>Start Options.
There are also a couple of other solutions to the problem that is triggered because acmgd.dll is now demand loaded at startup by default.
Change LOADCTRLS to 0xc (12) in the registry
Or don't copy acmgd to the debug/bin folder local. Change the Copy Local property for admgd.dll to False.