Hi @Devon Nullman ,
Thanks for the details.
I think this is an issue with handling too many lines in TextBoxes. Basically, a multiline TextBox in WinForms does not handle huge strings very well. Each time the form is resized horizontally, the control has to reflow and redraw every line of text, which can easily cause the UI thread to hang for several seconds. That is why the freeze only happens after the textboxes are filled.
You could test this with resizing when the TextBox is not populated or filled with fewer lines.
I've found some common ways for dealing with this:
- Use a
ListBox: ListBox Class (System.Windows.Forms) | Microsoft LearnListBox Class (System.Windows.Forms) | Microsoft LearnListBoxFound.Items.Clear() For Each file In FoundFiles ListBoxFound.Items.Add(file) Next - Instead of displaying all lines, only show the most recent N entries (e.g., 500). Keep the full list in memory for saving to file.
I hope my solution is helpful. Feel free to reach out if there's any problem.