Genicam connection monitoring in vb.net

Using the example from;
http://help.commonvisionblox.com/GenICam-User-Guide/html_english_genicam_connectionmonitoring_english.htm
It was a breeze to implement the connection monitoring for c#, but working on a vb.net project I run into a snag.

it seems that this part of the example is where the online code convertors don’t understand whats happening anymore;

disconnectedEvent = DeviceDisconnectedEvent;
I’m guessing it’s some syntactical fluff at fault, but I don’t exactly know what goes wrong, which frustrates my attempts at googling for a solution. Any ideas?

edit;
using the c style API of course, that’s usefull info to include :slight_smile:

You need the AddressOf keyword:

VB.NET delegates

You don’t need AddHandler as this is only a delegate and not an event.

1 Like

Thanks, that did the trick!