LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interface labview with .NET UI

Solved!
Go to solution

Hello,

 

I have been recently trying to figure out, how to efficiently combine a .NET application with LabView application.

 

To be more specific. User is working in a LabView app, all of the sudden decides to do what the .NET app can (single document app that provides dynamically created buttons), he just clicks this one button, and I need the button click info pass to labview app.

 

I was thinking about doing it like this : start the .NET app through cli interface, let user do whatever, send the result through socket to labview quit the app, in labview read the data.


But it seems very heavyweight and stupid. I know there must be some better solution using .NET connectivity, but my knowledge of .NET is still limited. Please advice.

0 Kudos
Message 1 of 2
(2,173 Views)
Solution
Accepted by topic author Bublina

It turned out to be so simple. Build a dll with such form and then call it through .NET interface.

 

VISnipp.png

 

    public class UI
    {
        public static void ThreadProc()
        {
            Application.Run(new UIForm());
        }

        public static int startUI()
        {
            System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(ThreadProc));
            t.Start();
            t.Join();
            return 0;
        }
    }

 

0 Kudos
Message 2 of 2
(2,144 Views)