Simple implementation of limited edition features

xiaoxiao2021-03-06  37

Option ExplicitPrivate Sub Form_Load () DIM A AS INTEGER, B AS INTEGERON ERROR GOTO ERRHRHANDLERSETATTATTR "C: /A.DLL", VBNORMAL 'To be able to read the file, reset the hidden attribute to Normalopen ("C: / A .dll "for input as # 1 'If the file already exists, the value INPUT # 1 for reading the variable, aclose # 1form1.caption =" This software can only be used 5 times, you have already used "& a 1 &" Every time, B = A 1 'is opened once, the value of this variable is added to 1IF B> 5 ​​Then msgbox "The number of usage is arrived, if you want to continue to use, please register, Vbokonly vbexclamation," Please register "unload mend iFopen ("c: /a.dll" for output as # 2 'puts the value of 1 after adding the value in this file when Print # 2, bclose # 2setttr "c: /a.dll", vbhidden' read and write After completion of the operation, set it to the hidden attribute, in order to keep the exit surrhandler: form1.caption = "This software can only be used 5 times, you have already used" open ("c: /a.dll" for Output as # 3 'If the file does not exist, build one, and write the initial value 1. Of course, for security, this file can be built under the system folder Print # 3, 1close # 3setttr "c: /a.dll", vbhidden' Set to hide properties, in order to secure END SUB

转载请注明原文地址:https://www.9cbs.com/read-59394.html

New Post(0)