RhinoScript include .dll file into project and invoke the calls to .dll

codes.rar (41.2 KB)hi everyone, could any one kindly help me, thank you very much!
there is a traditional VB project, three files “demo.frm”, “demo.bas” and “Sense4.dll”.
in the demo.bas, S4Control function was defined to be linked to the commands inside Sense4.dll.
in the demo.frm, S4Control function was called.
but when i copy the codes of demo.bas and demo.frm into Rhino Script 5.0, they could not run.
could any one help me: how can i transfer a traditional VB file that have a .dll .bas file to Rhino Script file?
thank you very much!

Hi Fengyee,

RhinoScript is based in VBScript, which is a subset of the Visual Basic you are familiar with. Because it is a subset, it does not have all of the features of Visual Basic, such as the ability to create and display VB forms and to import functions from DLLs. So, RhinoScript might not be the development tool you want to us.

Visual Basic .NET, on the other hand, is the current form of Visual Basic. And you can create plug-in for Rhino using Visual Basic .NET based on RhinoCommon. Now I don’t believe you can use older .frm files in Visual Basic .NET. But creating new forms in Visual Basic .NET is pretty easy. But, you can use functions in DLLs using DLLImport.

Does this help?