1. Melt the butter in a 12-inch skillet over moderate heat. Add the onion and cook, uncovered, for 5 minutes, or until soft.
2. Meanwhile, in a bowl, blend the cornstarch with 1 tablespoon of the half-and-half until smooth. Add the remaining half-and-half and the sherry if used. Set aside.
3. Add the mushrooms to the skillet and cook uncovered, stirring frequently, for 3 minutes.
4. Add the ham and the half-and-half mixture to the skillet. Cook, uncovered, stirring frequently, over moderately high heat for 3 minutes, or until the sauce thickens.