在vb.net中运行3次后如何停止应用程序 [英] How I can able to stop the application after running 3 times in vb.net

查看:70
本文介绍了在vb.net中运行3次后如何停止应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在vb.net中运行3次后如何停止应用程序.我要在启动应用程序3次后停止运行该应用程序!但是我无法在WWW中的vb中对此进行任何编码.

请帮助我!

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!

推荐答案

听起来像您想要的是您的应用程序的一种试用版.最简单的方法是将一个密钥写入注册表,然后在每次运行该应用程序时从您的初始写入值中添加或减去一个.当您命中零(如果要递减计数)或3(如果要递增计数)时,您将停止运行该应用程序.缺点是,如果用户确定了该注册表值,则可以更改它.

对于更复杂的示例,这是一篇可能对您有所帮助的CP文章:
为Windows应用程序实现基于基本计数的试用版插件. [ ^ ]

如果您想要更安全,则可能应该考虑购买第三方软件来创建试用版.

更新
这是用于跟踪天数的VB.NET解决方案的链接.您可以使用这些概念,而只是稍微修改一下实现以获得使用次数而不是天数:
http://www.vbforums.com/showthread.php?621068-Trial- Period-code-VB.NET [ ^ ]
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[^]


这篇关于在vb.net中运行3次后如何停止应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆