put Application.ProcessMessages; into your procedure.
BUT, be aware. This also means that the user can click the button/menu whatever, while your procedure is already running...
Whenever anything happens (button, pressed, form moved, form needs painting, ... an event is send to your app. The events are processed one after the other.
So your button.OnClick is such an event, and while it runs, all others will wait.
"Application.ProcessMessages;" will process those waiting ones.
so if you call it regularly then your form will still react.
But as i said the button can be pressed again.
Button.OnClick:
Your code running
ProcessMessages
Button.OnClick (nested call)
Your code from the outer onclick continues
Most often you do not want that to happen
You can either set a variable, and check at the begin of your OnClick. Or you set the buttons Enabled to False