LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview UI in Visual C

I'm in the process of trying to merge a LabVIEW app into a third party application.  In order to interact with this other application, I need to create custom COM objects that inherit from their provided classes: no fun, but fine.  I'm having trouble getting LabVIEW windows to interact properly with the windows from the main app. In one case, for example, my COM function is passed a HWND from the app that I'm supposed to use as the parent window for a dialog.  They of course expect me to derive from CDialog or a property page, but I want to use a LV window.  I'm able to create LV windows by calling VIs out of a LV built DLL, but they don't behave properly with the app because they don't insert properly into the app's window hierarchy.  Windows that are set to be modal in LV are not modal to the app.  Plus, the other app windows don't redraw properly when the LV windows are moved in front.
 
As a work around, I tried creating a CDialog window in VC, made my LV window a child to it using the SetParent Windows function and then maximized the LV window to take up the bounds of the dialog.  This nearly worked since the Dialog behaves properly with the app, but the LV window then fails to redraw itself when things pass in front of it.
 
I had the idea of trying to embed the LV remote panels activex control, but after reading a previous post that doesn't seem realistic (has anybody tried hacking through it?).  Does anybody have any ideas on how I might get my LV GUI to work within this other app?
 
 
0 Kudos
Message 1 of 4
(3,084 Views)
 

Codeman,

I'm a little befuddled by your question.  Are you trying to use the LabVIEW front panel as an input to your software?  If so, you would probably want to use Measurement Studio to integrate the visual style of LabVIEW with another application written in Visual C.  Measurement Studio would provide you with all of the graphical objects that you need.  It can be found here:

https://www.ni.com/en/shop/electronic-test-instrumentation/application-software-for-electronic-test-...

I hope that this helps.  Have a great night.

Brian Coalson

Software Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,054 Views)
You miss my point.  I already have a full blown functional labview application with very rich and complex GUI interactions.  The idea of using the LabVIEW GUI within this third party application is exactly to avoid having to recreate the same functionality in Visual Studio.  The amount of time and effort that would be required to duplicate the user interface in VS would void the whole project. I'm well versed in measurement studio, but its use would not gain me much in this case.  The question at hand is how to get the LV GUI and windows to work properly when launched within a non LV process.
0 Kudos
Message 3 of 4
(3,034 Views)

You should be able to accomplish this using the VI Server. This article has a C# example, but you should be able to adapt it to C.

 
0 Kudos
Message 4 of 4
(2,996 Views)