I did this. I went to Radio Snack, and bought a 12V chime. It only costs a couple of bucks. Hook the Pos+ to Headlight at the fuse box. Hook Neg- to Ign. or Acc. at the fuse box. Five minute install. When the headlights are on, they supply the power to the positive side. If the ignition is on, you get no ground supplied to the beeper/buzzer. When you turn off the ignition, it provides the ground you need. Works great, is cheap, easy to install, and saves you from the embarassment of telling someone that your beautiful car needs a jump because some dope left the lights on. No relays required.
Along the same lines as this. A frined's sister's car was broken into. They didn't want to spend the money on an alarm, but wanted it to look like it had one. We got a blinking LED and wired the Pos to Bat. and the neg. to Ign. Viola, it only blinks when the ignition is off.
Brian