What would cause these symptoms in a 20 year old dog being lethargic favoring a different front leg every 20 minutes loss of appetite and weak looking eyes and constant panting?

Dogs do not usually live 20 years. It sounds to me as though the dog is very old and may be suffering. You should take the poor old animal to a vet for advice.