Click here to Skip to main content
Sign Up to vote bad
good
See more: VB8.0VB9.0VB.NET
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 2 Oct '12 - 0:06

Comments
geekbond - 2 Oct '12 - 9:13
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:04
But my dear brother all these are are Java not VB. Please help me to do this in VB 2005 or VB 2008
geekbond - 2 Oct '12 - 11:25
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:56
Thanx bro
geekbond - 8 Oct '12 - 9:36
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[^]
  Permalink  
Comments
Chiranthaka Sampath - 2 Oct '12 - 11:05
I need VB 2005 or VB 2008 example not C#! But your help is valuable
Tim Corey - 2 Oct '12 - 11:14
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:56
Ok thanks Pal!

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 385
1 Sergey Alexandrovich Kryukov 348
2 Arun Vasu 345
3 Tadit Dash 228
4 Aarti Meswania 195
0 Sergey Alexandrovich Kryukov 9,955
1 OriginalGriff 7,589
2 CPallini 4,028
3 Rohan Leuva 3,422
4 Maciej Los 2,949


Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 2 Oct 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid