What do you expect? You make your UI thread busy with lengthy operation, why could you expect some UI activity? By miracle? :-)
And this is not related to a form. Why do you think that forms work independently?
You need to execute all blocking or lengthy operations in a separate thread, other then UI, to keep UI responsive. The only problem is: you cannot call anything related to UI from non-UI thread. Instead, you need to use the method
Invoke
or
BeginInvoke
of
System.Windows.Threading.Dispatcher
(for both Forms or WPF) or
System.Windows.Forms.Control
(Forms only).
You will find detailed explanation of how it works and code samples in my past answers:
Control.Invoke() vs. Control.BeginInvoke()[
^],
Problem with Treeview Scanner And MD5[
^].
See also more references on threading:
How to get a keydown event to operate on a different thread in vb.net[
^],
Control events not firing after enable disable + multithreading[
^].
—SA