In my Winforms app, I have a separate smaller window pop up form when a user clicks an item from the menu in my main form. Right now, this smaller form that pop ups has a button that once clicked, it will start copying files from one location to another.
There are a lot of files (over 6000) and I noticed that once I start the file copy procedure, when I click outside the window, like in my desktop or some other opened app, it shows that it is Not Responding on the top and everything is slightly greyed out. Interestingly, I can still see the files being copied in the destination folder when I have it opened even though the window says its Not Responding. This only happens when I minimize the pop up form or when I click outside of it.
Is there a way to fix this? I was wondering if also using the native Windows file transfer dialog/pop up might help, but I cant find good documentation on how to use it in a .NET 6 Winforms app.

Since you perform your operations on the UI thread, you cause the UI thread to be locked until the copy operation is finished. This is why asynchronous programming is so important. When you call an asynchronous method, you can call it from UI with async await pattern and wait with ConfigureAwait(true) (to avoid losing context and cross thread error.) You can continue your operations in mdi parent form.
TL;DR Make your method async Task till its Event Args like button click, data source change etc. (Make them async void) then wait them with await.
For more information