LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Registering to Exents and displaying UI of a native .NET assambly (C#) with LabVIEW 7.0 Express?

Hy there,

i red a something of LabVIEW 7's new .NET interface and I started to try
things out.
I was able to successfully create an .NET User Control with C# that exports
one property one method and one event for demonstration puposes.
It was piece of cake to access my the assamblys method and property but
unfortunately,
I wasn't able to figure out how I do register the .NET event with LabVIEW 7.
Additionally, it seems like LabVIEW 7 doesn't provides any feature to embbed
the
..NET assamblies user interface into a LabVIEW front pannel yust like with
ActiveX
or sub vi references.

Does anybody know how to register .NET events with LabVIEW 7 or
how to display a .NET assamblies
user interface in a LabVIEW front panel
container?

Thanks for your help, Sebastian Dau
0 Kudos
Message 1 of 4
(2,790 Views)
Hello

Currently, we do not have any support for handling .NET events from LabVIEW.

To show the UI, you would do it the same way you normally do in a C# program. You would use the System.WIndows.Forms.Application class's Run method, and pass it the reference generated from the constructor of your form class.

Just like the LV version of the following statement.

Application.Run(new Form1());

where Form1 is your dialog class.

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(2,790 Views)
"bilalD" wrote in message
news:5065000000050000000B4D0100-1073519706000@exchange.ni.com...
> Hello
>
> Currently, we do not have any support for handling .NET events from
> LabVIEW.

Thats a pitty, this would be a very usefull feature...

> To show the UI, you would do it the same way you normally do in a C#
> program. You would use the System.WIndows.Forms.Application class's
> Run method, and pass it the reference generated from the constructor
> of your form class.
>
> Just like the LV version of the following statement.
>
> Application.Run(new Form1());
>
> where Form1 is your dialog class.

I think you understood me wrong or maybe I took you wrong.
What I was trying to do is embedding a .NET user control (just like an
Acti
veX control with UI but with .NET technology) into a LabVIEW
vi's front panel so that it looks and feels pretty much the same way
like
a text box, combo box, or cluster control.
Do you have an idea?

> I hope this helps
>
> Bilal Durrani
> NI
>
0 Kudos
Message 3 of 4
(2,790 Views)
Hello

Labview cannot currently host .NET controls on its front panels like it can with activex. You might be able to simulate this effect thought if you create an instance of a form from within a VI and make it a child window of the Labview VI. You can use the windows SDK functions for this, like FindWindow() and SetParent().

Hope this helps

Bilal
Bilal Durrani
NI
0 Kudos
Message 4 of 4
(2,790 Views)