LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run an exe as a window inside a VI

Sure thing. The issue here is that I am wokring with the LabVIEW part while another colleague is working on building the Java part of the program and he said that he has programmed it for .NET access. So, assuming this to be true, can you tell me how to go about it?

 

Thanks a lot Mike.

0 Kudos
Message 11 of 39
(7,865 Views)
There are examples that ship with LabVIEW, but the process is basically the same regardless of language. You have a constructor node that creates an instance of the object and then you manipulate it with invoke nodes and property nodes.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 12 of 39
(7,860 Views)

Thanks Mike. I'll look into it.

 

Bharat

0 Kudos
Message 13 of 39
(7,850 Views)

By the way it is very possible to embedd a window of another application, LabVIEW or not into the front panel of a LabVIEW VI.  Its just a pain, ugly, and doesn't give you any features over just having a separate floating window.  In Windows a window can be a child to a parent window.  By default a window is a child to the desktop, meaning it can move around your whole monitor.  But you can set a window to be a child to another window, which makes for some interesting looking UIs, because a window will be in a window and can't leave.  You can do things like remove a title bar, menu bar, and disallow resizing on the child window and you get the appearance that the window is part of the existing application.

Message 14 of 39
(7,843 Views)
Do you have an example showing this? Sounds good.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 15 of 39
(7,821 Views)

@mikeporter wrote:
Do you have an example showing this? Sounds good.

Sure thing.  Attached is a zip that I think contains everything needed other than OpenG. 

 

The code is a little rough.  I did this demo in my free time when I learned about parent child window stuff.  In case you don't feel like downloading and running it, here is a video of it in action.

 

http://screencast.com/t/LjlkYzTWKr8J

 

I eventually took some of this information and turned it into the Multi Panel Interface as demo'd on LAVA.

Message 16 of 39
(7,798 Views)

@Hooovahh wrote:

 

The code is a little rough.  [...]


Nevermind.  Thanks for sharing your demo: Works like a charm

0 Kudos
Message 17 of 39
(7,768 Views)

Thanks Hooovahh...

0 Kudos
Message 18 of 39
(7,753 Views)

I know this is an old post but I found it very useful. Thanks Hooovahh for that.

 

But I do have one issue. When I try to run the given example with program different than Notepad (in my case it is Repetier) most of the buttons on this program stop working while it is in "child" mode. I am not sure if this could be fixed with some special settings. If anyone has any idea I would highly appreciate it. Thanks.

0 Kudos
Message 19 of 39
(6,935 Views)

Glad you like it, it was a fun example that I never really ended up using on a real project, partially because of the limitation I'm going to mention...

 

It just uses normal Windows DLL calls to the UI, so if it doesn't work with your program I suspect it doesn't abide by standard Windows UI components.  Like hiding the menu bar is very reliant on using standard Windows menu bars, and some programs (like LabVIEW) recreate their own that replicates standard functionality.  As a result things like hide and show menu bar might not work.  Move, and resize should work, but allow resize might also only work on programs that use standard functions.  I also am not sure what the issues are with 32 or 64 bit software.  I'm not sure if there are issues with the OS, Child, or Parent that need the same bitness or not.

 

Message 20 of 39
(6,929 Views)