Dan9969,
It sounds like you have patellofemoral syndrome (PFS). Also called retropatellar knee pain, anterior knee pain, and chondromalacia patella (this is actually an incorrect term, but it has been used for so long by many of the older physician, you can still find it being used).
PFS is most commonly seen in adolescents and young adult, but can affect anyone. It may be that the older population just isn't as active any more.
Most patients complain of pain under and around the patella (kneecap). This is worse with walking down stairs/ladders, sitting with the knees bent (called a positive theater sign), squatting, kneeling, and using the knee extension station on the weight machine.
It tends to wax and wane. Some patients have it once and it never comes back. Others tend to have periodically.
The actually etiology for it is not known. Playing sports when it is acting up does not damage the knee at all, if the patient is willing to put up with the discomfort.
There is no surgery to cure it. If it is associated with malalignment of the patella, then surgery may be done for the malalignment, but this is different from the run of the mill PFS.
Surgery to shave down the undersurface of the patella was tried in the past, with disastrous results. It just caused the cartilage to wear out faster, without helping the pain at all. When the arthroscopy came about, orthopedic surgeons hadn't learned their lesson, and though that they could use to 'scope to shave down the cartilage better. No, the results were the same. Didn't help the pain, and the thinned down cartilage wore out faster. So, surgery for PFS is no longer done.
Treatment for PFS is basically aimed at avoiding things that bother the patient. So, squatting, kneeing, and sitting for prolonged periods should be avoided. If a patient has to sit through a lecture or a movie, it is recommended that they sit on the aisle, so that the knee can be extended and moved every 5 to 10 minutes.
The knee extension station on the weight machine should not be used. This just crams the patella back into the femur, making the pain worse.
Instead, short arc quad exercises should be done (no more than 30 degrees of flexion). This selects out the VMO quadriceps muscle. If the VMO is kept strong, it tends to decrease the knee pain.
Use of a neoprene knee sleeve helps some patients. Some patients like the ones with a cutout for the patella. Key thing, it is comfortable to wear.
Ice before and after activity. Heat for soreness in the evenings.
Acetaminophen or one of the NSAIDs can be tried, if the patient has no contraindications to them.
But, other than that, there is not much else to do for the disorder. Just know that if it is PFS, it is not going to be crippling or cause arthritis. It is just one of those things that you have to put up with to be human.
So, do not keep the knee bent for so long that it starts to hurt. Flex and extend it 3 or 4 times, every 10 minutes of so, to prevent it from hurting. Take advantage of every rest break to get up and walk around a little.
Good luck.