Seat height is key, as you have discovered - for knees, too, not just for thighs. I'd stress what one other poster mentioned: cadence. The short of it is: keep your pedal revolutions high and your gearing low. As a practical matter, that means that, on the flat, you probably want to maintain a pedal cadence of somewhere between 70 and 95 revs per minute, shifting gears so that you can comfortably maintain it. (Where in that range you fit is a matter of personal preference, which comes from trial-and-error.) Going uphill, your cadence will almost certainly go down - on a downhill, your cadence (assuming you keep pedaling) will almost certainly be over 90 and maybe over 100.
The reason I mention this is that maintaining that kind of cadence will do a much better job of flushing out lactic acid that will cranking at 40rpm in a higher gear. (It's a lot easier to accellerate that way, too.) Not flushing out the lactic acid = hurtin' thighs, which I believe is where you came in.
Note this is not meant as an "instead of" for any of the other advice you have received - it all sounds good to me. But if you keep the cadence up in addition, I bet your thighs will thank you.
__________________
"I'm in shape -- round is a shape." Andy Rooney