What you are asking for is a Licensing option.
There are different ways to achieve it:
1) encrypted license files that contains the expiry dates
2) encrypted license keys held in the registry
3) challenge/response mechanism which require an internet connection
4) many more.......
Try:
License Key Generation[
^] or:
How can I create a Product Key for my C# App[
^] or:
c# Licensing[
^]
Couple of them are in C# which can be seen to start on Vb.NET
Also,
Cryptography 101 for the .NET Framework[
^]
Hope this helps.