Any chance of getting the sample code in VB?

 

I am failing to get it a C# conversion that works.

 

Thanks