Heat the butter in a large saucepan, add the onion and cook for 5 minutes until softened. Add the ham and cook for 1 minute.
Stir in 125 g (4 oz) of the flour and cook for 1 minute. Gradually add the milk, beating well between each addition. Bring to the boil, then reduce the heat and cook gently for 5 minutes until thickened. Season and then pour into a bowl. Press a sheet of clingfilm over the surface and then chill for at least 6 hours or preferably overnight.
Roll walnut-sized pieces of the ham mixture into tapered cylinders using lightly oiled hands. Leave to rest in the refrigerator for 30 minutes. Place the remaining flour on a plate, the eggs in a shallow bowl and the breadcrumbs on a separate plate. Dust each croquette in the flour, then roll in the egg and finally in the breadcrumbs, shaking off any excess each time.
Pour the oil into a large, deep saucepan or deep fat-fryer to a depth of at least 7 cm (3 inches) and heat to 180–190°C (350–375°F), or until a cube of bread browns in 30 seconds. Deep-fry the croquettes in batches for about 3 minutes until golden, then remove with a slotted spoon. Drain on kitchen paper and keep warm while you cook the remaining croquettes.