Is this WPF or Windows Forms? When I started writing WinForms, this blog post helped me learn about different runspaces and how to make the forms more responsive: https://www.sapien.com/blog/2012/05/16/powershell-studio-creating-responsive-forms/
If you are doing it in WPF, I have a series of posts on UI development: http://www.ephingadmin.com/better-know-a-powershell-ui/ The "Quack like a duck" post talks about different threads and uses PoshRSJob (3rd party cmdlet on GitHub) to do the threading. Boe Prox (the author of PoshRSJob) has a lot of good information on this also. Here's a post about writing data from one thread to another: http://learn-powershell.net/2012/10/14/powershell-and-wpf-writing-data-to-a-ui-from-a-different-runspace/ Let me know if you need any other resources! On Thu, Feb 25, 2016 at 4:59 PM Mote, Todd <[email protected]> wrote: > So I've written a fancy PowerShell script and given it a GUI and it works > great. As I add more features to it though, I find that it’s taking longer > and longer to run and thought I would try to get it to run in a separate > thread to free up the GUI. I’m not finding many resources to help me learn > how to do that. Can anybody point me to any? I know about sunspaces, bur > have not had any luck with getting them to work. Help? > > > > Sent from my Windows 10 phone > > > > ================================================ > Did you know you can also post and find answers on PowerShell in the > forums? > http://www.myitforum.com/forums/default.asp?catApp=1 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1
