I hope I have correctly translated from french: you are looking for a way of exiting an infinite while loop by means of a button in the user interface.
You can obtain this using a common variable set to 0 before starting the while loop, raised to 1 in the button callback and used as an exit condition inside the loop. For this mechanism to work, you will need to add a ProcessSystemEvents () inside the loop, otherwise user interface events are not processed by the program while executing the loop.
I'm sorry but I'm not able to translate it in french: I hope this explanation is clear enough.
You can look at the attached project for an example.
Roberto