Is there any codeplex license that allows some one to use my code any way they want but not to create a program that does the same thing that my programs do?
The only way you can prevent a program from reproducing functionality is with patents.
Following on from your comment:
You will need to have a lawyer draft a license as you have very specific needs. The license will have to specify the exact conditions the code can be used under (or the conditions it cannot be used under.)
I am not aware of any "generic" license which covers this type of arrangement. And there are a wealth of issues to consider, for example:
Step 1. You have automatic copyright over your source code. This gives you, and you along the ability to distribute your application legally.
Step 2. You release the code under an open source license. The code is still yours, but now people can use it for whatever they wish, including recompiling and distributing the project under a different name (but with attribution?)
Step 3. You want to impose a restriction on the open source license, which you are within your rights to do. However this has to be very carefully worded and thought out.
- Can I use part of the code in a similar application? How do you define similar?
- What if I modify it? What about derivative works? Are they the same thing as your product?
- Does it cover future versions of the code?
Disclaimer: I am not a lawyer. These are just ramblings that I can recall from the legal and ethical modules from my CS degree. All I can do is advise you to hire a lawyer to draft a license.