Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

when ChildForm.ShowDialog() made on non-separate non-ui thread, how to center child form to parent form

$
0
0
Thought it could be easier for ChildForm showing progress to the user by calling its ShowDialog  on a separate thread and ui thread doing all the processing [as UI thread gives me more freedom to refresh/reload controls]. But in this process running into trouble to center childform to the parent. Since both parent form and child form were created on main thread unable to parent as parameter to ChildForm.ShowDialog which is being called on a non ui thread. On this non ui thread also tried parent form Invoke in non ui thread to pass it as parameter to show dialog but does not work. Any ideas.

Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>