LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET Month Calendar control and User Events

Solved!
Go to solution

I am playing around with creating a user event for the .NET MonthCalendar Control. I would like for the user event to fire when a user selects a day on the Month Calendar control, however, I cant seem to even see a list of user events when I select the Register for Events - User Events pick list.

 

Am I doing something incorrectly here? This is my first time using the User Events portion of LabVIEW (actually, I am looking to enhance one of my existing programs) and I'd figure I'd play in a VI first.

0 Kudos
Message 1 of 9
(4,106 Views)

With .net control you have to register an Event Callback. You can trig a user event from the callback vi or perform the action in the callback vi.

 

Ben64

Download All
Message 2 of 9
(4,072 Views)

Another dumb question. How do I get the DateSelected to trigger an event in my Event Handler (or really, anywhere) so I can place the date into an indicator?

0 Kudos
Message 3 of 9
(4,013 Views)
Solution
Accepted by Eric1977

You can pass user parameters to the Callback VI. In the attached example I'm passing a string indicator reference. You can expand the Reg Event Callback node to pass more than one user parameter.

 

Ben64

Download All
0 Kudos
Message 4 of 9
(4,009 Views)

Ben - Thank you for the help. Learned something too!

0 Kudos
Message 5 of 9
(3,999 Views)

Hi,

 

....could you kindly post the VIs converted to LV2015? Thanks in advance!!

0 Kudos
Message 6 of 9
(3,220 Views)

how can i edit the code for the callback vi? it seems to be running even though it isnt

0 Kudos
Message 7 of 9
(2,797 Views)

Huh.... Seems to be a bug with .NET callback in LabVIEW. I had the same behavior, not being able to edit the callback VI after running the top level VI. This is from NI's own example located at "C:\Program Files (x86)\National Instruments\LabVIEW 201x\examples\Connectivity\Dot NET"

 

Callback Example 1.png

 

Before running "Passing Data to a .NET Event Callback.vi"

 

 

 

Callback Example 2.png

 

During execution.

 

 

Callback Example 3.png

 

After hitting stop, the callback VI is uneditable.

 

LV 2019 32 bit

0 Kudos
Message 8 of 9
(2,785 Views)
Message 9 of 9
(2,779 Views)