Click here to Skip to main content
15,891,704 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How I can able to stop the application after running 3 times in vb.net. I want to stop running the application after launching the application 3 times! But I cannot any coding for that in vb in the WWW.

Please help me!
Posted
Comments
Akinmade Bond 2-Oct-12 9:13am    
Check this link on codeproject if you want to make your app a trial version. http://www.codeproject.com/Articles/15496/Application-Trial-Maker
Chiranthaka Sampath 2-Oct-12 11:04am    
But my dear brother all these are are Java not VB. Please help me to do this in VB 2005 or VB 2008
Akinmade Bond 2-Oct-12 11:25am    
You can easily convert C# projects to VB.Net with the following tools.

http://www.fishcodelib.com/Convert.htm
http://www.developerfusion.com/tools/convert/csharp-to-vb/

I particularly like developerfusion, I used it everytime when I hadn't learnt C#, you can zip an entire project and you get the VB equivalent which is mostly 90% accurate.
Chiranthaka Sampath 3-Oct-12 18:56pm    
Thanx bro
Akinmade Bond 8-Oct-12 9:36am    
Happy to help.

1 solution

It sounds like what you want is a type of trial version for your application. The simplest way to do this would be to write a key to the registry and then add or subtract one from your initial written value for each time the application is run. When you hit zero (if you are counting down) or 3 (if you are counting up), you would stop the application from running. The downside is that the user could change this registry value if they figured out where it was.

For a more complex example, here is a CP article that might help:
Implementing a Rudimentary Count Based Trial Version Plugin for Windows Applications.[^]

If you want even more secure, you probably should look into purchasing third-party software for creating trial versions.

Update
Here is a link to a VB.NET solution for tracking the number of days. You could use these concepts and just modify the implementation a bit to get number of uses instead of number of days:
http://www.vbforums.com/showthread.php?621068-Trial-Period-code-VB.NET[^]
 
Share this answer
 
v2
Comments
Chiranthaka Sampath 2-Oct-12 11:05am    
I need VB 2005 or VB 2008 example not C#! But your help is valuable
Tim Corey 2-Oct-12 11:14am    
C# easily converts to VB.NET. In fact, if you compile the information into a DLL, you wouldn't even need to convert it. You could run a C# dll with your VB.NET program. Another option would be to take my first suggestion and roll your own. I'll add another link to my answer that will get you started down that road. Basically, you are either going to have to pay for something or do some work. We don't have a pre-built VB.NET option for you.
Chiranthaka Sampath 3-Oct-12 18:56pm    
Ok thanks Pal!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900