01-28-2010 06:11 AM
Is it possible to display the Labview VI as a child window in a C# windows based application?
The requirement is - " There is a windows based application written in C#, and some Labview VI's for communicating with devices. We need to open(view) these LabView VI's inside the C# Application as child windows. "
01-28-2010 06:29 AM
Hm, i doubt that this works out directly. I am not aware that you can include another application into the panels of the calling application as child windows.
WHat you can do is to compile the application you want to "embedd" as ActiveX Server or .NET assembly. Reason is that these two interfaces enables embedding (OLE-part of ActiveX for instance; OLE stands for "object linking and embedding").
So i would compile the LV part of the application as ActiveX dll and embedd it into a window of the .NET application.
hope this helps,
Norbert
01-28-2010 07:40 AM
01-28-2010 09:09 AM
Making one window be the parent of another is actually pretty easy to do with a simple call to the Windows API. SetParent takes a handle to each of the windows and getting the handle is simple (using FindWindow) if you know the window title. If you search here for "MDI" you should find some example VIs which can even show you how it's done, although that's less relevant if you're calling the reparenting code from the C# app.
Note that some people had various problems with reparenting LV windows, so you really might want to consider the other option mentioned here, of publishing the FP and using a browser control to access it.