Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Migrating from VB6 to .NET 2005

Hello,

I did a search but didn't found what I need.

That's the point: I'm migrating our software to .NET. I know that the best to do would be to rewrite it from scratch, but it would take really too long, so I'm using the well-known wizard.

The software uses NI controls and functions, like CWserial, CW3dgraph, CWNumEdit and so on. And now comes the big problem... the Variant data type! From the first time i used VB6 (when i was 17) I hated the Variant data type (bad programming habit etc.) and never used it, but I see that NI controls are often using this data type (sigh!).

Now that Microsoft had the great idea to eradicate it from VB I'm converting all the Variants to normal data types, but the problems come with NI controls and functions... I see events that are returning a variant data type and now I'm stuck with this. When the wizard translates that events it makes strange code that will obviously never work, or simply deletes the control (like for the CWNumEdit) and the associated code.

Is there a way to resolve this in a simple manner? Maybe replacing the controls in VB6 with controls that are compatible with .NET and work well after the upgrade process? I'm sorry but I don't know a lot about NI (before this work i never used NI and the code I'm working on was written by other programmers) and sorry if I said something stupid!

I have installed the latest drivers we have (the daqmx software 8.5).


Thanks again,
Borut
0 Kudos
Message 1 of 3
(3,465 Views)

Hello FreeStyler,

here's a document explaining how to deal with Measurement Studio ActiveX analysis control when you need to upgrade VB6 codo to .NET:

Can I Use the Measurement Studio Analysis ActiveX Controls in Microsoft .NET

Also there's this forum discussion post that may be useful.

Finally, I suggest you this free Microsoft book you can get here which explains how to migrate from VB6 to .NET; in particular you can take a look to the chapter 13 that is related to ActiveX controls (in your previous post you wrote about CWserial, CW3dgraph, CWNumEdit)

Hope this helps, 

Best Regards, 

Fabio 

Fabio M.
NI
Principal Engineer
0 Kudos
Message 2 of 3
(3,450 Views)

Hi Freestyler,

If you want you can also give a look to the following totorials that can help you in finding how to convert Variant data type for a proper ComponentWorks controls work with

http://zone.ni.com/devzone/cda/tut/p/id/2949

The second link helps you with a description of programming changes you will encounter as you develop applications with the Measurement Studio ActiveX controls in Visual Basic .NET:

http://zone.ni.com/devzone/cda/tut/p/id/4587

hope this helps. Please let me know if you need any further assistance and I would be glad to help in any way possible!

Regards,

Alessandro

0 Kudos
Message 3 of 3
(3,437 Views)