My program hangs after a button is clicked
I am having trouble when my button is clicked, lets say it is a button which executes a function. I want the function to run only once when the button is clicked. When I click the button in my program now it runs the function then hangs and stop responding, I cant move it, minimize, close, etc. How do I prevent this?