LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you embed LabView Vi's within a .Net Windows Form?

Hi
 
We are developing a distributed .Net application and I am wondering if a Labview Vi can be embeded within a .Net (C#) Windows form.
 
Currently we intent to use a ms script control on the form to execute site specific highly mathematical code and feel that a block diagram approach like LabView would be much nicer and easier to use for the scientists /mathematicians to use themselves rather than passign on the spec to programmers.
 
Is this possible?
 
Thanks in advance
 
Paul King
0 Kudos
Message 1 of 6
(4,296 Views)
You can make a LabVIEW window as a child window of any window.
Search this forum for child window, you'll find a lot threads.
Basically, you call Window API - SetParent to make a window as
a child window of another.  Then you need SetWindowPos.  Becasue
child window uses parent window's coordinate.
 
 
George Zou
George Zou
Message 2 of 6
(4,287 Views)
Hi Paul,
 
When you say you want to embed a LabVIEW vi into a .NET form, what exactly do you mean?
 
I think the rest of your e-mail implies that you want to use LabVIEW as a development tool and then have this code as part of your main C# application. So not actually embedding the front panel, but calling the code from your C# like a dll/library.
 
Or do you want to embed the LabVIEW development environment into your C# application so that users can develop LabVIEW code within your applications native environment.
 
If you can clarify what you are trying to do, then I'll take a look at ways it could be done.
 
Regards
 
Hannah
NIUK & Ireland
0 Kudos
Message 3 of 6
(4,266 Views)

Hi

Yes I should have made it clearer

We are developing a C# application where there will be customer specific mathematics. What I would like to do is to be able to diagramatically design the maths with labview and also have the ability to develop/view the labview model within the distributed aplication.

A tall order I know but it would be so much cooler than vbscript

Paul

0 Kudos
Message 4 of 6
(4,265 Views)

Hi Paul,

OK, so you actually want to embed the LabVIEW development environment into your application. So users can develop code from within your running C# application.

Unfortunately there is no way to do this. At best you could have a copy of LabVIEW with each distributed application so users can use LabVIEW itself to build up the mathematics and then call this from your C# code, but as this will be customer defined on site I can't see a way to do this (in terms of getting the inputs and outputs from the functions that can change with each run of the program). Also with this, you would have to purchase a copy of LabVIEW for each installation you wanted of your application.

I agree that this would be a good idea, but unfortunately just not possible.

Regards

Hannah
NIUK & Ireland

0 Kudos
Message 5 of 6
(4,252 Views)

Hi

Thanks for all your help, guess its back to the scripting idea.

Could be good for the future though as for people like us, we will need to send a mathematician and a programmer to the otherside of the world for implimentation where as you could easily let a mathematician loose on labview and our implimentation takes several months of playing with the maths at site

Paul

0 Kudos
Message 6 of 6
(4,249 Views)