LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET RegisteredCallback Events Not Firing in LabVIEW

I tested programming a .NET control and Properties and Methods all worked fine. So I decided to buy and license the control. Just to find out that the registered callback events will NOT fire in LabVIEW.

 

I searched the forums and do see some posts on this but no clear solution.

 

Does this mean that LabVIEW does not support .NET CallBackEvents registration? And is this now official?

 

I am using LabVIEW 2020 on Windows 10 OS.

 

Grateful for any advise on this.

 

AnthonyL

0 Kudos
Message 1 of 9
(991 Views)

By control do you mean you have a new class that has System.Windows.Forms.Control as a base class? https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.control?view=netframework-4.8 Or are you referring to the use of a generic assembly and ensuring event handlers are called?

 

An example showing your issue would also be helpful.

 

 

0 Kudos
Message 2 of 9
(972 Views)

(un?)Fortunately, this is presumably a problem in either the control or your use, so as tyk said an example would be helpful.

 

I can confirm that I have used .NET callbacks in 2019 and 2020, both 32-bit although I believe it should also work in 64-bit (but you need the correct assembly in each case).


GCentral
0 Kudos
Message 3 of 9
(936 Views)

As tyk said your explanation leaves a lot open for interpretation and guessing. While I usually try to avoid .Net whenever possible I can confirm that I have used .Net events with the Register Callback node and got them to work as expected in LabVIEW since many many moons. 

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 9
(932 Views)

Hello tyk and rolfk:

 

I am using a licensed third party (paid) grid display GUI component by the name of c1FlexGridClassic.NET. I add the grid to a .NET container and make the Grid editable, and then I register the AFTER EDIT callback event. I then run the program in a loop to see if I can capture the AFTER EDIT event; which I do not.

 

To know if I am capturing the AFTER EDIT event, I added code to increment a global variable counter by 1. And also to show a dialog box of the incremented counter.

 

After running the program and changing some cell contents, and hitting <ENTER>, none of those two things happened. i.e. The counter stayed at 0, and the dialog to show the incremented counter never showed up.

 

Conclusion was that the .NET registered callback event did not get recognized in LabVIEW. This event feature though works in Visual Studio,

 

Attached is the LabVIEW code as well as the front panel showing the grid display component in a .NET container with some added text.

 

BIG QUESTION

============

I just want to know if NI is no longer supporting third party .NET components in LabVIEW. Because there is also a .NET license activation issue, where LabVIEW fails to recognize that the .NET component license has been activated. As of this writing, there is an on-going support ticket logged with NI on this issue.

 

That same license is being recognized in Visual Studio.

 

Anthony L.

 

Download All
0 Kudos
Message 5 of 9
(929 Views)

@Anthony_L wrote:

 

I just want to know if NI is no longer supporting third party .NET components in LabVIEW. Because there is also a .NET license activation issue, where LabVIEW fails to recognize that the .NET component license has been activated. As of this writing, there is an on-going support ticket logged with NI on this issue.


.Net is certainly supported. The .Net license activation is a fairly recent Microsoft feature (that IMHO is rather poorly implemented). NI has not made any substantial new features for .Net support since a long time as it worked pretty fine for most of the things. How and even if they plan to support the license feature will depend also on how well the mechanism is documented by Microsoft. The way it looks to me, part of the security for it seems to be obscurity too. But even without that problem it's definitely not a high priority feature by any means.

 

Managing proper licensing of individual components should not be the responsibility of the hosting application, but of the component itself.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 9
(915 Views)

I realize this moves away from your current/actual question, but why do you need this paid-for grid display? What feature does it offer that you're particularly keen to use (relative to more native options?)


GCentral
0 Kudos
Message 7 of 9
(898 Views)

To add to what cbutcher said, that .NET Grid looks a lot like a native LabVIEW table grid.

0 Kudos
Message 8 of 9
(894 Views)

Hello Eric1977 and cbutcher:

 

The grid display I am using is for a data intensive test data management table for GeoTech materials testing. Some key features are:
 
  • in-cell drop down
  • in-cell button click
  • Saving variant data behind a cell (for instantaneous access)
  • Column sort
  • Row tree Hierarchy display
  • Cell icons
  • Easy Print grid method
  • Easy Export grid to MS XL file format method (even with MS XL not installed on target PC)
  • Column re-organisation by mouse for data anlaytics
  • Clean Column Hide-Show
  • ...plus much more.
*** This specific data display grid  (i.e. FlexGrid by Component One) has a 300 page manual of all the functionality.
 
Important Note:
I am migrating the same code base from a fully functional ActiveX version of same grid display control to the newer .NET version of that display grid.
 
The reason for migration: is due to instances of non-responsiveness to keyboard editing of ActiveX version of grid display cells when the display grid has been left idle for an extended time.
 
Here are two screen shots of how I am using the grid.

 

AnthonyL

 

Download All
0 Kudos
Message 9 of 9
(887 Views)