By keeping the form open you mean keeping the form in idle mode?
From where does your program get input?
In other words what is the program (that contains a wiform) does in general?
You could stop execution by not accepting anymore input.
If you want to freeze the program (for whatever reason) you can do
Code:
while (freezed)
Application.DoEvents();
this will freeze the program at this point and wait until the variable freezed changes and in the meantime read messages. Assuming you want this in order to check the winform after an error.