BlinkStick Flex and vb.net in Visual Studio 2017


#1

Hi

Is there anyone who has experience with programming of BlinkStick Flex in Visual Studio 2017/2015 using VB.net?

Can anyone give an example?

Sincerely
Bjarne


#2

There are a lot of examples in C# so it should be very easy to translate them to VB.NET:

Let me know if you still have trouble using BlinkStick and I will provide some VB.NET examples.


#3

Thanks

I have tried with this code, but it causes an error with “Blinkstick.FindFirst()”.

BC30491 Visual Basic AND VB.NET Expression does not produce a value.

Imports BlinkStickDotNet

Dim device As BlinkStick = BlinkStick.FindFirst()
If device IsNot Nothing Then
If device.OpenDevice() Then
device.TurnOff()
Console.WriteLine(“BlinkStick was turned off”)
Else
Console.WriteLine(“Could not open the device”)
End If
Else
Console.WriteLine(“BlinkStick not found”)
End If