Hello Andy,
The problem you're having with the display of the text in your second image is: the text string that's been scanned into your ListBox contains an ASCII code for either a carriage return (gb.Cr) or a line feed (gb.Lf). Perhaps even both (gb.CrLf). This crams two lines of text into a vertical space designed for only one line of text.
I'd use the Replace() function, which will clean any of those three ASCII codes from the text string if they're present (because we don't know which one it is), allowing it all to be on the same line, separated by a dash character.
In my code example below, I'll clean any of those ASCII codes from the text already present at index zero in the ListBox. But its always better to clean these codes from the source string, before it gets assigned to the ListBox. Depending on how your code works, it may simple. Or it may be simpler to fix what's already in the ListBox.
Here's the code:
ListBox1[0].Text = Replace(ListBox1[0].Text, gb.Cr, " - ")
ListBox1[0].Text = Replace(ListBox1[0].Text, gb.Lf, " - ")
ListBox1[0].Text = Replace(ListBox1[0].Text, gb.CrLf, " - ")
ListBox1[0].Selected = True
This code will also select that same line, giving it the blue line you wanted. To allow multiple lines in the ListBox to be selected, I believe you'll need to set its "Mode" option to "Multiple", otherwise leave it on "Single".
I hope this helps. Good luck,
Godzilla