After the gui works perfectly I am stunned how to integrate it into an endless program loop. The gui is meant to display the status of several socket-connections. So I have:
- the gui call PowerShell button click event scriptblock not working
GenerateForm - the endless loop that reacts on the orders of the gui and is stopped if the EXIT-button of the gui is clicked.
How do I do that without the gui (GenerateForm) called again and again?
do {
# write the status lines of the gui...
} until ( <# exit-function of the gui was called #> )
#disconnect, close and dispose..