Welcome![Sign In][Sign Up]
Location:
Search - VB as

Search list

[WinSock-NDISVB注册码代码示例

Description: 软件限时使用与注册功能的实现 众所周知,一些共享软件往往提供给使用者的是一个功能不受限制的限时使用版,在试用期内使用者可以无限制的使用软件的全部功能(只是可能会出现提示使用者注册的窗口),试用期一过部分(或全部)功能失效,要想继续使用只能向作者索取注册码(或注册文件)完成对软件的合法注册,注册后的软件将解除一切使用限制。如果您也开发出一个有价值的作品,是否也希望为自己的软件增加一个这样的功能呢?这里笔者就提供一个实现软件限时的完整代码。   软件启动后会首先运行本代码并从注册表HKEY_LOCAL_MACHINE\Software\MyProgram子键下的三个键值MyProgram1-3中读取键值数据。其中MyProgram2的值是软件首次运行日期,MyProgram3的值是软件当前运行时的日期,MyProgram1的值是软件的使用标志:如果软件在试用期内则其值为字符串sign1;如果软件试用期满则其值为字符串sign2,如果软件已经注册则其值为字符串sign3。全局变量ZHUCE依据读取的MyProgram1键值而赋值:ZHUCE=-1说明试用期满,ZHUCE=-2说明软件已注册,ZHUCE=其它值为剩余天数,您的主程序代码要依据此全局变量ZHUCE的值设计相应的交互响应。   为方便您将代码嵌入现存的程序代码中,本示例将全部代码写入一个模块.bas中(模块名随意,也可添加到已有模块中)。注意,代码中的Private Sub Main()过程为整个程序的启动入口,您需要在“工程属性”对话框中将“启动对象”设置为“Sub Main()”。 '通用模块 Global ZHUCE As Integer '说明:全局变量ZHUCE=-1试用期满,ZHUCE=-2已注册,ZHUCE=其它值为剩余天数 Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef phkResult As Long) As Long Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal lpData As String, ByRef lpcbData As Long) As Long Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long Private Sub Main()'程序总入口 Dim a As Long, rc(3) As Long, hKey As Long, KeyValType As Long, KeyValSize(3) As Long Dim c As String, h As String, tmpVal(3) As String Dim datetime As Integer datetime = 30'试用期天数 ZHUCE = -1 On Error GoTo cuowu '以下从注册表HKEY_LOCAL_MACHINE\Software\MyProgram的三个值中取出相关数据字串tmpVal(3) a = RegOpenKeyEx(&H80000002, "Software\MyProgram", 0, 131135, hKey) ' 打开注册表关键字 For a = 1 To 3: tmpVal(a) = String$(1024, 0): KeyValSize(a) = 1024: Next rc(1) = RegQueryValueEx(hKey, "MyProgram3", 0, KeyValType, tmpVal(1), KeyValSize(1)) rc(2) = RegQueryValueEx(hKey, "MyProgram2", 0, KeyValType, tmpVal(2), KeyValSize(2)) rc(3) = RegQueryValueEx(hKey, "MyProgram1", 0, KeyValType, tmpVal(3), KeyValSize(3)) For a = 1 To 3 If (Asc(Mid(tmpVal(a), KeyValSize(a), 1)) = 0) Then tmpVal(a) = Left(tmpVal(a), KeyValSize(a) - 1) Else tmpVal(a) = Left(tmpVal(a), KeyValSize(a)) End If Next a = RegCloseKey(hKey) '关闭注册表 '使用期限判断 If tmpVal(3) = "sign3" Then ZHUCE = -2: Exit Sub '查找到已注册标志sign3 If Len(tmpVal(1)) = 1023 And Len(tmpVal(2)) = 1023 And Len(tmpVal(3)) = 1023 Then '首次使用,将当前日期分别写入tmpVal(1)和tmpVal(2)中,在tmpVal(3)中写入准许运行标志sign1 CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram3", Date$, "REG_SZ" CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram2", Date$, "REG_SZ" CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram1", "sign1", "REG_SZ" ZHUCE = datetime MsgBox "试用期剩余" & Trim(datetime) & "天" Else If tmpVal(3) = "sign2" Then '查找到永久中止标志sign2中止使用 ZHUCE = -1 Exit Sub MsgBox "试用期已满,请您注册!" End If If Date datetime Then '使用期超过datetime天中止使用 '写入tmpVal(3)中止使用字串sign2 CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram1", "sign2", "REG_SZ" ZHUCE = -1 MsgBox "试用期已满,请您注册!" Else '写入当前日期于tmpVal(2)中 CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram2", Date$, "REG_SZ" ZHUCE = datetime - (DateValue(Date) - DateValue(tmpVal(1))) MsgBox "试用期剩余" & Trim(datetime) & "天" End If End If End If cuowu: End Sub   从安全保密角度出发,当您应用上述代码时紫色部分应该根据您个人的保密设想进行必要的修改(当然您也可以不修改而直接应用):①示例中的代码把软件的注册与运行信息保存在HKEY_LOCAL_MACHINE\Software\MyProgram子键下的MyProgram1-3三个键值内,请根据您个人的保密原则修改为您所需要的子键名,以隐蔽为原则!②MyProgram1键值中的数据(字符串sign1或sign2或sign3分别对应着试用/期满/注册)应根据您个人的保密设想修改成需要的字符串,也以隐蔽为原则!   主程序中当用户输入正确的注册码(注册码当然是您随意愿而设)后,请执行语句: CreateObject("WScript.Shell").regWrite "HKEY_LOCAL_MACHINE\Software\MyProgram\MyProgram1", "sign2", "REG_SZ" 完成软件注册。(该行代码中的Software\MyProgram\MyProgram1和sign2请与上述代码保持一致!)
Platform: | Size: 18051 | Author: dianfeng | Hits:

[File OperateVB加密解密源代码

Description:

rijndaelvb.zip

The enclosed VB project includes a VB class that implements the Rijndael AES block encryption algorithm. The form in the project runs some test data through the class.

The rijndael.asp file is a VBScript ASP file that can be used as a server side include for encryption using the Rijndael AES block cipher algorithm. The rijndaeltest.asp shows how the encryption routine can be called by running some test data through the algorithm.

 


Platform: | Size: 13456 | Author: yusy2000 | Hits:

[.NET/ASPXProgramming and Problem Solving with VB.NET

Description: Visual Basic is arguably the most popular computer programming language for application development in the United States and around the world today. Visual Basic is also an excellent language to teach as a "first" computer language because of its easy-to-learn syntax and flexibility. This book treats Visual Basic as a serious programming language and not as just another Windows application. One concern that is frequently voiced when discussing the differences between Visual Basic and C++ is the level of object-oriented programming supported by Visual Basic. With the release of VB. NET, the language will support all the major features of object-oriented programming–encapsulation, inheritance, and polymorphism.
Platform: | Size: 5713779 | Author: richardhjc | Hits:

[FlashMXVB&FLASH

Description: 由浅入深介绍,如何在FLASH中调用VB程序和 ,如休将FLASH中的参数传给VB程序。内含教程文档两篇VB源码2个, flash源码-Easy-to-digest introduction, how to call FLASH procedures and VB, such as the break will be the parameters in the FLASH program to VB. Course includes two VB source document 2, flash source
Platform: | Size: 946176 | Author: freshtea | Hits:

[Windows Developvb计算器

Description: VB写的计算器,可给VB初学者作参考-calculator writtend with VB,can be used as referrence for the VB beginer
Platform: | Size: 1024 | Author: 新浪客 | Hits:

[BooksVB实例

Description: vb实例,内容不错-vb examples, as well
Platform: | Size: 1915904 | Author: 顾都都 | Hits:

[Compress-Decompress algrithmsVB网络应用

Description: VB网络应用,例如:聊天系统,浏览器程序-VB network applications, such as : Chat system, browser procedures
Platform: | Size: 221184 | Author: 田强 | Hits:

[Windows Develop物资管理系统

Description: 原来做课程设计时候编写的物资管理系统.用vb做的,可以数据库进行增删改查询,分等级权限等操作.代码共享,可以作为学习vb的数据库开发的 参考,在使用中有问题可以给我写信-original design courses do when preparing the materials management system. Vb do with the database can be changed to delete inquiries and graded operational competence. Code sharing and learning vb as the reference database development, the use of any problem can write to me
Platform: | Size: 88064 | Author: 黄挺 | Hits:

[GUI DevelopVB对Word97中书签的编程

Description: 1、上述程序在VB5.0中文版和安装了Microsoft Word97的Windows98中文版环 境下调试通过。 2、实例中模板文件的格式并不局限于此,可以是任意格式的Word文档;书签 的定义也不局限于文本,还包括为引用而命名的位置。 3、实例中,当更新书签内容时,应采取更简便的方法,避免程序的冗余。通 常的做法是:按一定的命名规则定义书签(如b1,b2,b3),将所有的数据信息 存放在数据库中,而数据库字段的命名也采用相应规则(如b1,b2,b3),因此 可以利用循环的方法从数据库中读出数据,同时更新书签内容。 4、第3点说明实际上与数据库发生联系,从而可实现标准文档的批量生成和 连续打印。-one, the above procedures in VB5.0 and installation of the Chinese version of Microsoft Word 97 Chinese version of the Windows 98 environment through debugging. 2, examples template file format is not limited to this, it can be in any format, Word documents; Bookmark not confined to the definition of the text, but also as a reference to the location and name. 3, example, when the content is updated bookmarks, should take a more easy ways to avoid redundant procedures. The usual practice is : according to certain rules of naming bookmarks definition (b1, b2, b3), all the data stored in the database and the database fields are named accordingly adopted rules (such as b1, b2, b3), it can use recycled from several methods According to library sensed data, bookmarks updated content. 4, 3:00 not
Platform: | Size: 108544 | Author: | Hits:

[OtherVB中实现“擦视”技术

Description: VB5软件设计时,窗体间切换时也应该做到平滑自然,这就是所说的“擦视技术”(Wipe)。本程序实现了“擦视技术”效果-VB5 software design, switching between windows should also do smooth Naturally, this is the "shining as technology" (Wipe). The procedures of the "shining as technology" effect
Platform: | Size: 1024 | Author: 力风 | Hits:

[Com Portvb串口通讯

Description: 这个文件是有关系统串口通信的实例,作为学习串口通信入门来说是一个很好的参考实例,它是基于vb语言的,而且其中很多代码可以直接移植 -this paper is on the serial communication system examples, as a learning portal Serial Communication is a very good reference example, it is based on vb language, but many of them can be directly transplanted code
Platform: | Size: 82944 | Author: 伍军伟 | Hits:

[Windows DevelopVB设计的屏保

Description: 1)屏幕保护程序运行时,鼠标光标被自动隐藏,在程序结束时,光标显示。2)当单击、移动鼠标或按下键盘时,屏幕保护结束,回到正常操作状态。为了实现这些特性,在编写VB应用程序时,可以采用如下方法:   1、改变窗体属性通常VB应用程序的窗体都采用有边框的窗体外观,但作为屏幕保护程序,应设置窗体为无边框,且为最大化。   2、隐藏及显示鼠标光标在Visual Basic应用程序中隐藏及显示鼠标光标需要运用Windows的API函数,该函数名为ShowCursor。当用参数值True调用时显示鼠标光标,当用参数值False调用时,鼠标光标自动隐藏。   3、检测鼠标移动VB中有一个检测鼠标移动的对象事件MouseMove事件。MouseMove事件通常在应用程序启动时就会触发,有时在鼠标并未移动的情况下,MouseMove事件仍有可能被触发。因此如果在程序中直接用MouseMove事件检测鼠标是否发生了移动,并不能正确反映鼠标的移动状况。应该在MouseMove事件中编写代码加以控制。 -1) screen saver running, the mouse cursor automatically hidden, at the end of the procedure, the cursor display. 2) When the click, move the mouse or press the keyboard, the screen ends and return to normal operating status. To achieve these characteristics, in the preparation of VB applications, can be used as follows : a change forms usually attribute the VB application forms have adopted a frame of the window appearance, but as screen protection procedures should be provided to non-Window frame, and as a maximum. 2, hide and display the mouse cursor in Visual Basic Application Program hide and display the mouse cursor need to use Windows API function which is called ShowCursor. When using parameters True called to show the mouse cursor, using parameter values False call, the mouse curso
Platform: | Size: 2048 | Author: 田欣 | Hits:

[Other Databasesvb程序实例

Description: VB开发数据库系统 VB程序实例 内含工厂系统 学生系统等-VB database system containing examples of plant systems such as the students
Platform: | Size: 1406976 | Author: 张英 | Hits:

[Windows Developvb project

Description: vb编写的综合程序,包括计算器,画板(很象windows自带的),通讯录,拼图游戏(很有意思,还带音乐)。功能齐全,界面非常美观,没有bug。-program writed by VB,include calculator,palette(look as if mspaint in windows),address list,spelling-picture game(very interest,alse with music),function all ready,alse with a slinky interface,NO bug
Platform: | Size: 212992 | Author: ctp | Hits:

[Windows DevelopVB(gondex1100)

Description: 用VB控制GONDEX1100条码打印机,使用动态链接库驱动打印机,欢迎参考使用-Use VB controll gondex1100 bar code printer, and use DLL driver. Welcome use it as a reference.
Platform: | Size: 2225152 | Author: 我是谁 | Hits:

[Button control使用WORD作为VB的报表工具

Description: 使用WORD作为VB的报表工具,很好用的,请大家快快下载。-use Word as VB reporting tools, the good, everyone can download.
Platform: | Size: 32768 | Author: 小万 | Hits:

[Windows Develop通用库存管理系统 vb

Description: 用vb编写的通用库存管理系统,很好的,可以用做毕业设计的哦!-This is a general warehouse management system that designed with VB. It s great and can be used as a graduate project.
Platform: | Size: 192512 | Author: 王蕤 | Hits:

[Communicationtongxin一个小小而简单的VB通信程序

Description: 一个小小而简单的VB通信程序 实现了两端的连接和发送信息, 要知道对方IP和端口-a small and simple VB communication programe which realizes the connection and message between two sides as if get the other one s ip and port
Platform: | Size: 13312 | Author: 解放 | Hits:

[Education soft systemVB .net编程百例

Description: 基于VB开发的教务信息系统,可作为开发者参考-based on the VB Senate information systems, developers can be used as reference
Platform: | Size: 2890752 | Author: 石强 | Hits:

[Chess Poker gamesvb

Description: 这是以VB为平台开发的一个人机对战的五子棋游戏,此代码精简,实用,堪称经典-This is the VB as a platform to develop a man-machine war of Gobang game, the code streamlined, practical, classic
Platform: | Size: 3072 | Author: 加文 | Hits:
« 12 3 4 5 6 7 8 9 10 ... 50 »

CodeBus www.codebus.net