I have the following problem, I want to restrict the entry of data to a textbox, which only allows the data to enter through a barcode scanner and prevent the user from typing the code, since to type the code has to enter as another type of user. What he tried was the following
if(textBox1.Text.Length > 1)
{
}
else
{
textBox1.Clear();
MessageBox.Show("No puedes ingresar el codigo de manera manual");
}
but apparently the code also affects what the scanner is. I want to know if there is any way to achieve it