From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open VB built exe with LabVIEW Front Panel

Hi All,
I have a VB based application(.exe) alongwith the source code files from VB. Is it possible to run this application directly through LabVIEW, but we can add our custom front panel for this application?
For example, if there is a certain button "START" built from VB, I would simply like to replace it with a LabVIEW "START" button so as to make the UI user friendly and decorative.

Is this possible?

Thanks!


-Parag D
-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 1 of 7
(2,714 Views)

You could transform the VB exe into an ActiveX object (you will need to publish all calls that are made from and to your VB FP), which you then call from LV.

 

Felix

0 Kudos
Message 2 of 7
(2,700 Views)

^ ^

Can you please explain me this in some more detail?

 

Thanks.

-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 3 of 7
(2,696 Views)

Not really, as I'm no VB programmer. But take a look in the ActiveX examples, how you would do the calls from LV.

As a note, this won't be a simple task, as you will need to rewrite the VB code to fit in. And then wrap it all inside LV.

 

Felix

0 Kudos
Message 4 of 7
(2,692 Views)

Can we convert VB .exe assemblies to Activex objects?

-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 5 of 7
(2,686 Views)

maybe this will help

 

http://www.insteptech.com/techLibrary/vbClassic/vb6_active.htm

.......^___________________^
....../ '---_BOT ____________ ]
...../_==O;;;;;;;;_______.:/
.....),---.(_(____)/.....
....// (..) ),----/....
...//____//......
..//____//......
.//____//......
..-------
0 Kudos
Message 6 of 7
(2,664 Views)

It has been quite a while since I did this but here goes.  You can start a new VB project.  You should see a window that allows you to select the type of project.  Some of the choices are ActiveX, DLL, and others.  I've worked with DLLs before but not with ActiveX components.  After opening the new project, you can copy your code from its original project to the new one.  You may have to make a few modifications.  With a DLL, any functions defined in VB can be called from Labview.  Compiling the VB code will produce a DLL file if you chose a DLL project.  In Labview you can use the Call Library Node function and specify the DLL name and function name and parameters.  If you want to display your VB forms, I think you would have to compile the code into an ActiveX com module instead of a DLL.  I'm not sure how you would call the forms from Labview though.  Like I said, its been a long time since I've done this.  Maybe someone else could chime in.

- tbob

Inventor of the WORM Global
Message 7 of 7
(2,604 Views)