Spread ham in a greased casserole.
Cover with corn and juice, sprinkle with chopped onion.
Melt butter in a saucepan, stir in flour, salt and pepper; add milk, stir constantly until sauce is smooth and thick.
Pour over ingredients in casserole.
Sprinkle with crumbs and grated cheese.
Bake in 350F oven for 30 minutes.