but that's not ideal as it blocks the script and I'd like the display the output in win forms controls like RichTextBox. I've tried creating a timer and updating the RichTextBox content with the log file content on timer tick, but that loads the log file every time and is therefore terribly inefficient. Surely there must be better way to do this....
I had a similar issue while using PowerShell to develop winforms. I was able to get around it is by utilizing PowerShell jobs. The guys at Sapien have a good blog post on this. (it would be ideal if you are using PowerShell Studio, But if you read the code you can get an idea)
Thanks for the suggestion. Jobs or timer will help with the application being (b)locked part, but I don't know then how to monitor the log and display only the changes. Since in that scenario, I (assume) can't use the get-content -wait -tail approach.
Can you elaborate little more?
The topic ‘realtime log display in windows forms’ is closed to new replies.