There is no perfect way of protecting your code, a determined hacker can bypass most any security scheme. The FoxPro first line of defense - ReFox branding can be broken with cheap and/or free tools. Even with Microsoft's resources, their new XP OS activation scheme based on "up to 10 hardware IDs" has been broken, so don't expect to find a really secure software technique.
It often comes down to price of the product, preceived value to the potential customers and amount of support required. If the price is too high, more people will likely try to use it for free. If continued use of the product requires updates (e.g. virus checkers, tax programs), then there is also more incentive to pay for the required support.
The "cheapest" hardware based solution is a dongle that must be present to run the software. Of course this does add cost and overhead to the product, it can irritate legitimate customers, and even it can be broken given the time and need by pirates.
Rick