I am working on a Windows Forms Application that should get data from a USB Scale. The USB scale is handled like a Keyboard. If someone puts something on the scale, the scale starts to type the weight String like a USB Keyboard. Before, I'd let the scale type the Weight String into a Textbox by clicking into textBox in the Forms App. But now I need to obtain the weight string intern without letting the Scale write directly into a textBox. So that the Program can process the data from the scale while it is in Background.
So at first I think I have to choose a Device for the Input. (something like Keyborad on Com Port XY) So I need to create a List including all Input Devices. How do I do this in C# .Net?
I already tried:
string[] devices = GetRawInputDeviceList;
textBox1.Text = devices[0];
textBox2.Text = devices[1];
But this is not working. Could maybe someone tell me how to do that? Or what do you guys think is the best way to solve my Problem? Please Help!