Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

I'm trying to add a Visual Basic 6.0 module to a Visual Basic .net project.

I'm trying to add a Visual Basic 6.0 module to a Visual Basic .net project. Is there a direct way to do this?

Also in the 6.0 module I added code so VB.NET would reconize the module but it seems that the .dll will not load when I make a function call from my code. The module I am trying to put in VB.NET is attached
I'm not sure why the .dll is not loading, any suggests?

Thank you,
Brian Grove
0 Kudos
Message 1 of 2
(3,241 Views)
Hello Brian,

The NIDAQ32.BAS module you're attempting to load was written by National Instruments to provide Visual Basic 6.0 users with the ability to use the Traditional NI-DAQ API. However, the Visual Basic language changed between VB6.0 and VB.NET, so that's why you aren't be able to load the .BAS file directly into VB.NET.

You can try converting the declarations for VB6 to VB.NET syntax (see Creating Prototypes in Managed Code at MSDN), but this is not supported by National Instruments. I have had varying success with this approach.

National Instruments does support the use of the new NI-DAQmx driver under VB.NET.
You can use this approach if your data acquisition device is supported by DAQmx (NI-DAQ Driver Support for Windows). The latest NI-DAQ driver includes the .NET assemblies which you can use to program with.

David Mc.
NI Applications Engineering
Message 2 of 2
(3,241 Views)