title: Why is FileUtilities.CopyFile wrapper for CopyFileEx interfering with winforms?
body: <p>I’m using the <code>FileUtilities.CopyFile</code> wrapper for CopyFileEx from here <a href="http://msdn.microsoft.com/en-us/magazine/cc163851.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/magazine/cc163851.aspx</a> . I thought the <code>CopyFileCallbackAction</code> doesn’t get called until after the file is copied (I’ve tried copying a large file). And therefore asked this <a href="https://stackoverflow.com/questions/8392001/how-do-i-get-copyfileex-to-report-back-so-i-can-cancel-a-file-copy-operation">How do I get CopyFileEx to report back so I can cancel a file copy operation?</a> question. But now I’ve found that it actually gets called many times, but for some reason it messes the form on which I’m trying to show the progress – the form doesn’t get updated until the copy is done. In fact, if I try running it in the <code>Shown</code> event handler – the form has empty boxes where buttons are supposed to be – until the copy is done. Why is that?</p>