Trial
0 отговора
38 прегледа
Trial
'-------Ето едно добро решение
Private Sub Form_Load()
' the "A" in getsetting and savesetting
' can be changed to another letter
retvalue = GetSetting("A", "0", "RunCount") ' this returns the value of the registry edit.
Worm$ = Val(retvalue) + 1 ' adds one To the value of the regisrty edit.
SaveSetting "A", "0", "RunCount", Worm$ ' saves the new value
If Worm$ < 25 Then 'put one number higher then it says.
' this is the popup to warn the user how
' many runs have been executed and how man
' y are left.
MsgBox "you have used this program " & Worm$ & " Times. Only " & (25 - Worm$) & " left."
End If
' this is the statement to check whether
' to execute the form load or end program
If Worm$ > 24 Then 'put one number lower then it says.
MsgBox "you have used this program 25 Times, purchase is now required", 16, "Sorry"
' this would send the user to a website
' in their default browser.
Unload Me
End
End If
End Sub
'Fully commented by Orion Belt®
'©opyright 2001-2002 by Alph@ - All Righ
' t Reserved