Legs almost straight at the extension. Thighs parallel or lower at the top of the pedal stroke. But yeah, get it to what feels right. If the front of your knees hurt, raise your seat higher. I kept having to go higher, higher, higher, a couple millimeters at a time, finally got it high enough. If the back of your knees hurt, lower it.
You can also adjust the tilt of your seat, and you can make it a little closer or further away from your handlebar.
2009 Trek 7.2FX WSD, brooks Champion Flyer S, commuter bike