Console app working with Windows Form app
Im trying to figure out how I can display my console output on a windows form
I want to be able to display a variable everytime it gets updated
However my current version only displays the variable after the loop has finished
Is there any way around this or do I have to wait for the loop to finish
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1250850957005160468/image_2024-06-13_173428262.png)
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1250850957525389452/image_2024-06-13_173435409.png)
![No description](https://answer-overflow-discord-attachments.s3.us-east-1.amazonaws.com/1250850957990953050/image_2024-06-13_173458739.png)
2 Replies
if the purpose is just to see what its printing
you could use Debug.WriteLine instead
and it will be output to the Output window of visual studio
Otherwise u need to pinvoke to add the console
https://stackoverflow.com/a/4363184/450121
the problem here is that Thread.Sleep locks the ui
that is not how u want to do it
delegate
:Skull: