c# - Parent window and thread affinity -


I have a WinForms application where I want to do some long-standing tasks, e.g. Copy Explorer 2 large files into parallel. For each of those long-running tasks, I'm starting a separate UI thread (which includes pumping messages / apps). Where I make an example. Run / Application.ExitThread

I am thinking - due to the connection of the thread of windows - to package the main form handle in a HandleRef and pass it as the owner / guardian of the progress dialogue. Is the legal, which is on a different UI thread? I'm not entering secondary UI threads (no cross-thread exception exceptions in debug mode) to main window handles, only to give it to native function.

Thank you.

Yes, it's okay windows allow different thread windows to parent / child's relationship gives.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -