The product that Vedat Ozan Oner suggests seems interesting although I have not tried it myself.
I have worked on a demo of a product activation. It can get real complicated to start from scratch.
I you do an article search here on Code Project for "License" then it will pop up several articles that go thru various ways to do it on your own and give you some ideas of what could be involved.
http://www.codeproject.com/search.aspx?q=license&sbo=kw&x=0&y=0
This simple way would be to just add something that records the install date and time and every time the program starts do the math on current date time and the install date. But it would be easy to bypass by just changing the date without encoding or encrypting the information.
You also have to remember that unless you obfuscate the code using one of several programs it can be easily reversed engineered.