LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Launching & displaying a windows application within a LabView front panel

I've been asked to develop a LV app that, amongst numerous requirements, would be able to launch and open a separate windows application and have the 'front panel' of that external app be embedded on the front panel of my LV app.  (not floating around on the windows desktop) Somewhat similar I suppose to a LV sub-panel opening up so that a user could interact with a sub-vi.  But in this case the "sub-Vi" is not a sub-vi at all but rather a separate windows app.  Yes I could use the system exec feature and launch the external app via command line invocation and have it open quite nicely. BUT... the front panel of that windows app would appear floating elsewhere on my Windows desktop and not within the bounds of my LabView front panel itself where I want it to be constrained.

 

And certainly the user could manually drag, move, and position both apps next to each other. But the request is to have the external reside and have it be embedded within my LV front panel.  Can what I describe be accomplished? Is it possible? From the searching I've done thus far it appears that this can not be accomplished. But figured I'd post the question anyway.   Ya' never know.

Thanks.

Ed

0 Kudos
Message 1 of 6
(5,026 Views)

There is a Library for windows API to move size and place on top of other windows. https://forums.ni.com/t5/Example-Code/Windows-API-Function-Utilities-32-bit-for-LabVIEW/ta-p/3996462 This uses DLL calls. I have used with XP but not windows 7 or 8. 

 

0 Kudos
Message 2 of 6
(5,018 Views)

There is a Windows API for this: SetParent.

Here is link: SetParent

 

It's not included in the Windows API Function Utilities (32-bit) for LabVIEW.

 

 

George Zou
0 Kudos
Message 3 of 6
(5,007 Views)

To add to George's reply, you should be able to find some examples here or on LAVA by searching for "MDI".


___________________
Try to take over the world!
0 Kudos
Message 4 of 6
(4,980 Views)

I bring back up this old topic because a need to ask a similar question. I haven't understand how this stuff works. How can i call the setParent API in labview?

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

@FM82 wrote:

I haven't understand how this stuff works.


Each window has a handle, which is a number identifying it and you can generally get that by calling the FindWindow function. The function probably asks you for the handle of the parent and child windows.

 

Other than that I can't say, as I haven't done anything with this in quite a few years, so I'll just repeat my previous suggestion: search for "MDI".


___________________
Try to take over the world!
0 Kudos
Message 6 of 6
(4,697 Views)