Controlling button

Is there a way to make a button control the arduino?
for eksemple:
I'm making a program where whenever I hold down a button to runs a program (only once) and then when I let go it resets.

Put your code in setup(), and connect your button in series with the power supply? Great power saving then too :wink: