I have an application that uploads files to a server, but when I press upload it freezes until it is done, so I was thinking to make another form pop up that says uploading and does all of the uploading on that form nested of freezing that main form. But to do this I need to be able to send the selected information to that other form.
I have tried using a BackgroundWorker but that doesn’t work, the form still freezes.
The reason why its freezing is because you are doing uploading on the same thread as the GUI or main thread.
You could create a worker thread to handle the working of the uploading so the GUI doesn’t lock while processing the upload.
Example:
Passing information from one form to another is straight forward, but this form will also result in a lock while processing. If that’s what you want to do then just create a constructor to take a param for whatever you’d like to pass. Then call it accordingly.