LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

need to call .NET (C#) gui

Hi,

I want to create a GUI in C# (something that can't be done in LabView ).

I opened a WindowsControlLibrary project in Visual Studio, and compiled that project into a DLL file.

In labview I call the Constructor Node (in the .NET function palette) and then the functions inside the DLL file through Invoke Node.

 

The problem I have is that I want to create GUI with C#, so in the DLL there is a class that creates some kind of a form (basically a regular window), and I can't see that form. The VI finished and there is no error but the form never shows up on the screen.

 

I'm using LabView 7.1, Visual Studoi .NET 2003, winXP.

 

Thanks,

Shimi

0 Kudos
Message 1 of 5
(3,052 Views)
I'm assuming that the constructor you are calling is for something in the WinForms namespace, or derived from that. If that is the case, then you should think about upgrading to LabVIEW 8. In 7, we have support for calling .NET classes, but not really support for the UI components (UI integration is a non-trivial piece of work). In LabVIEW 8 we added the .NET container - very similar to the ActiveX container - that lets you host a WinForm control on the front panel of a VI. My guess is that this is what you want.
 
If I misunderstood your post, please let me know.
Message 2 of 5
(3,049 Views)

This could be what I need.

Are there any examples for that? (I don't want  to install LabView 8 if I don't have to...)

Thanks,

Shimi

 

0 Kudos
Message 3 of 5
(3,034 Views)
I'm not sure what you mean by an example that doesn't involve LV 8. But, for example, you can drop down a .NET WinForm Calendar control onto a LV front panel and get/set properties, call methods, respond to events, etc.
0 Kudos
Message 4 of 5
(3,024 Views)

Hi,

I meant an example with LabView 8 that shows the new features.

Anyway, I installed LabView 8 and it works. The only way I managed to work with it is by adding what I want to the LabView Front Panel and not opening a new window, but that's fine.

Thanks again,

Shimi

0 Kudos
Message 5 of 5
(3,020 Views)