LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event from .NET Picture Box

PictureBox Snippet.JPG

I tried a code snippet --- but was unsuccessful.

 

This is the block diagram.  It is calling the VLC Medial DLL for displaying video off of a IP camera.

 

If I am disable displaying video, the mouse click is captured.

If the video is live, the mouse click is NOT captured.

 

I guess I'm still questioning if the Event structure, as I have it setup, is correct for capturing the mouse click from the .NET event.  With NO video being displayed, is the mouseclick captured by native labivew? Therefore, when the PictureBox is 'alive' the event is not captured?

 

I have tried registering the Event Callback before and after the VLC initialization, but it does not appear to make a difference. 

 

Thoughts?

0 Kudos
Message 11 of 18
(1,070 Views)

What's inside your callback VI?  Can you put in something like a "one button dialog" that the callback VI calls to see if the event is actually firing?

 

You probably want to create a user event that fires based on the callback VI:

 

Main handler.pngCallback VI.png

0 Kudos
Message 12 of 18
(1,060 Views)

I setup a callback and main loop just as you showed.

 

I get the same results:  No video:  The system provides coordinates; With video, coordinates will not display.

 

I'm going to attempt to post code.

0 Kudos
Message 13 of 18
(1,043 Views)

Callback.JPG

____________________________________________________________________________________________________________

 

Main.JPG

0 Kudos
Message 14 of 18
(1,039 Views)

Hmm.

 

Can you see if the media DLL for VLC has any events associated with it?  Or if the VLC player has any .NET assemblies registered on your system that do? 

0 Kudos
Message 15 of 18
(1,034 Views)

The answer would be 'yes', but with this being my first .NET implementation (I picked a good one,huh!), that will take me some time.

However, it does seem like I saw something related.

0 Kudos
Message 16 of 18
(1,006 Views)

I found this (old) post while trying to get a webcam overlay working.

If you only need mouse events working concurrently with video, use the events of the ActiveXContainer which contains the PictureBox.

0 Kudos
Message 17 of 18
(891 Views)

Bumping an old thread:

I have managed setting a callback for MouseClick and MouseHover and see that the events fire, but MouseEnter doesn't work.

Worse, in the callback, I try setting the cursor, per the .NET documentation, but it doesn't work either.

0 Kudos
Message 18 of 18
(465 Views)