Progressbar inside Button? No problem

It’s quite cool efect, but this is also effective way to save some space in your application GUI. Let’s place progressbar of some time-consuming function right into the button, which started this function.
Place Button and Progressbar components on a form and set Visible property of Progressbar to False. Now, use the following code to do the magic.

When you press the Button, the Progressbar will be set to visible (disabling the button itself). When the time-consuming function is over, the button will be reenabled again and progressbar will be set to invisible state.