Managing swarming by splitting the colony
Once you find a queen cell cups with eggs or larvae, one thing you can do to prevent the bees from swarming is to essentially simulate swarming. This management technique is also called 'controlled swarming'. You split the colony by taking the old queen and a couple of brood combs without queen cells, but with workers and move them into a new bee hive. This si supposed to represent the swarming action. Unfortunately, the old queen, especially if she is unmarked, might be very hard to find, so this is not always a trivial task. The original colony that no longer has a queen, will raise the new queen from a swarm cell. This queen can later be replaced by a reared queen at the end of the season, usually during feeding. if you do not wish to increase the number of hives in your beeyard, you can kill the old queen and return the worker bees to their original hive. For extra information on how to split a colony you can see here.