LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use .net controls in labview

Hi,
 
I am using labview for quite a while now but started using .net recently. I am trying to use .net controls on labview front panel. There are not too many examples available on this topic. Even the help topic in labview help is very limited. Is there a kind of crash course or something on this topic. And how much .net knowledge one needs to have to use .net controls. Is there a book available on the topic of .net and Labview integration etc.?
 
I want to thank everyone in advance.
 
Kam
0 Kudos
Message 1 of 11
(6,125 Views)
The trouble with writing help files is that you have to settle on a target audience, and write for that. My feeling is that the section dealing with .NET in the LabVIEW help was written for someone who knows about .NET and just needs to know how to use it in LabVIEW. It's not intended to instruct someone on what .NET is and how to use it. So, someone looking for that will find it very limited. I, on the other hand, found it adequate, but that's because I've done .NET programming in C#. As for books, there is no book that deals exclusively in integrating .NET with LabVIEW, though I don't know if the latest editions of the more popular LabVIEW books have a chapter on this. I'm sure the authors will chime in with a plug if that's the case. Smiley Wink

As for examples, there are 5 examples that ship with LabVIEW that deal with .NET. The "NET Meetings Calendar" makes use of an actual .NET control on the front panel. The others seem to use constructors in code.

Using .NET in LabVIEW isn't really that much different than using ActiveX, so the same concepts apply. Also, using a .NET control in LabVIEW is very similar to using a .NET control in another programming language, such as C# or VB.NET. Basically, to use a .NET control you place a .NET container on the front panel and select the contol you want to insert into the container. That provides a reference to the control and you can set its properties and call its methods. Beyond that, it's a matter of the control as to how to program it.

Was there a specific control you wanted to know about?
0 Kudos
Message 2 of 11
(6,111 Views)

Hello,

Thanks for the detailed information. I was trying the .net combo box control. I did put the .net combo box control in the .net container. Now I am trying to populate this combo box (don't knwo how????). I did find the a property for this control called "List", now how do I use it??

Thanks again for the information.

 

Kam

 

 

0 Kudos
Message 3 of 11
(6,109 Views)
You actually want the "Items" property and then that collections "Add" method, as shown below:


Tip: You should download the .NET help file, which is available with the .NET Software Development Kit. The help file contains all the documentation on all the .NET classes as well as tons of examples. There's also lots of web pages dealing with .NET controls.

Message Edited by smercurio_fc on 08-31-2007 09:42 AM

0 Kudos
Message 4 of 11
(6,106 Views)
Thanks for the example. I really appreciate it. Where can I download the .net help file that you just mentioned here.
 
Thanks again.
 
Kam
0 Kudos
Message 5 of 11
(6,104 Views)
For 2.0: http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx
For 1.1: http://www.microsoft.com/downloads/details.aspx?FamilyId=9B3A2CA6-3647-4070-9F41-A333C6B9181D&displa...

They're big downloads.

A general book on .NET would be of use, though you can find the same information on .NET controls on the web.
0 Kudos
Message 6 of 11
(6,094 Views)
Maybe you want to preselect one of the items as well....



Please note that this approach (just as the one from smercurio) is all the same for many .NET controls, just like smercurio already stated 🙂


hope this helps,
Norbert B.

Message Edited by Norbert B on 08-31-2007 09:58 AM

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 7 of 11
(6,091 Views)
Thanks.
 
It was really helpfull.
 
Thanks.
0 Kudos
Message 8 of 11
(6,082 Views)

This seems very clear, thank you!


I was trying to create and I got stuck trying to make a "ComboBox+ObjectCollection" Property.  When I right click and search all the possible combinations, I'm failing to see "ObjectCollection", Add, or Item.  I found "Items".

 

How do you insert   "ComboBox+ObjectCollection" Property?

 

 

0 Kudos
Message 9 of 11
(5,024 Views)
OK, a couple things: first the original thread is 7 years old. That is a lot of time for interfaces to change.

You really should start a new thread stating the problem you are having and showing the code you have tried.

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 10 of 11
(5,006 Views)