LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Assigning Event Callback at Design-Time. Possible?

I am working with an ActiveX OCX that was written in Delphi. I am trying to get an Event Callback to work:

Currently, the event callback is not happening, even though events are being generated. (Events using this same OCX work using other development environments including VB6, VB.NET, and Excel VBA). I can tell the event is not being recognized as there's a pop-up message box in the event handler ( "2" )shown above that's not firing. The NI example Event Callback VI's run just fine.
 
After contacting the OCX author, I find out the OCX is written using Delphi and requires that event handlers "must be assigned at design-time"  and that "dynamically assigning the OCX events causes problems."
 
Unfortunately, I'm a dedicated wiring geek and that's pretty much over my head. Any suggestions on how I might "hardwire" the event callback so that it is established before the application is run?  Thank in advance for your time.
0 Kudos
Message 1 of 3
(2,850 Views)

I found the answer so I thought I'd post it here just in case someone else is ever searching for a solution.

Event callbacks with this OCX ActiveX plugin only work if the ActiveX object is placed on a container within the VI (or one linked to the VI). Simply using a Reference that points to the ActiveX object is not enough for Event Callbacks to work.

0 Kudos
Message 2 of 3
(2,830 Views)
Hello Wiredup,

Thank you for sharing your solution with the community!

Have a great day!
Kameralina

0 Kudos
Message 3 of 3
(2,822 Views)