Good morning

I really hope someone can take pity on me and give me some assistance, because I'm sitting here surrounded by the hair that I've torn out this morning.

I'm in the process of building a VB winform which allows the user to import data from a CSV file. It then performs a variety of tasks against the data that's been imported. Because the import file usually contains upwards of 8,000 records and the subsequent tasks can take quite a bit of time to complete, I've added a progress bar and a text box which I use as a status window to provide the user with details of where they are in the process.

Everything is working absolutely perfectly. However I've got the vast majority of the code I've written behind the form, so I want to look at pushing the code into separate classes so that there's as little code behind the form as I can get away with. However when I do that, the UI stops updating - if I step through the code I can see that the functions that should be updating the progress bar and status window appear to be working, but nothing is appearing on the UI.

Everything that I'm doing for this is being handled as a multithreaded task. So, when the user clicks the appropriate button on the UI, the code behind that button assigns the action as a background thread and starts it.

Can anyone provide me with some assistance? I'm seriously going bald here!