0

I have a Windows Forms application containing a TextBox. After I focus on the TextBox, I use a USB barcode scanner to read out a barcode string which always starts with a Line Feed (LF) character. The string that I retrieve later from the TextBox via the Text property does not include the LF character. I tried to capture the KeyUp event but it did not help either, the LF character seems to be ignored. How can I detect the Line Feed character?

Radu M.
  • 1,271
  • 2
  • 14
  • 19

1 Answers1

1

I think that you need to set the MultiLine property of the text box to True
Using a textbox with its default value for Multiline (false) strips away the newline chars

Steve
  • 213,761
  • 22
  • 232
  • 286