📄 thelock.frm
字号:
VERSION 5.00
Object = "{ADD24EDC-ADC1-11D2-95D1-F7A835DD4948}#3.0#0"; "NSLOCK15VB5.OCX"
Begin VB.Form TheLock
Caption = "Double Lock"
ClientHeight = 3495
ClientLeft = 60
ClientTop = 345
ClientWidth = 7695
Icon = "TheLock.frx":0000
LinkTopic = "Form1"
ScaleHeight = 3495
ScaleWidth = 7695
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton Command1
Caption = "E&xit"
Height = 495
Left = 3000
TabIndex = 3
Top = 2760
Width = 1815
End
Begin VB.Timer Timer3
Left = 240
Top = 240
End
Begin nslock15vb5.ActiveLock lckthelock
Left = 120
Top = 840
_ExtentX = 847
_ExtentY = 820
Password = "Pass"
SoftwareName = "The Lock 2000 v2.0"
LiberationKeyLength= 16
SoftwareCodeLength= 16
End
Begin VB.Label Label1
Height = 375
Left = 1920
TabIndex = 2
Top = 480
Width = 3495
End
Begin VB.Label unreg1
AutoSize = -1 'True
Caption = "Unregistered Evaluation Version"
BeginProperty Font
Name = "Arial"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 330
Left = 1440
TabIndex = 1
Top = 1080
Visible = 0 'False
Width = 4500
End
Begin VB.Label unreg2
Alignment = 2 'Center
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Arial"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Left = 960
TabIndex = 0
Top = 1680
Visible = 0 'False
Width = 5535
WordWrap = -1 'True
End
End
Attribute VB_Name = "TheLock"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Dear Friend in Visual Basic
'This is the second edition of TheLock the new name is DoubleLock
'DoubleLock demonstrates how you can make a shareware program that locks
'itself using:
'* ActiveLock OCX Control freeware Copyright by Nelson Ferraz
'
'**********New**********
'
'The Lockprog procedure and the NEW login form by Ahmed Hassan
'Note that you should use a stronger encrypt decrypt functions.
'I can not tell you which algorithm you should choose because
'it should be kept secret!
'Please refer to Active Lock for details and conditions of use.
'I would like to thank my friend in Visual Basic Nelson Ferraz
'for making Active Lock available for Visual Basic programmers free of charge
'and also because he was the one who suggested that I make this
'procedure available to other fellow programmers.
'I hope that you find this program useful and you use in your programs
'And I would like to get your comments or suggestions.
'we are trying to make the best there is,and for free.
'So please help us with your feed back.
'My e-mail is ahmedarmando@hotmail.com
'If you would like to comment on Active Lock
'please send e- mail to Nelson Ferraz directly.
'ActiveLock web site
'http://www.insite.com.br/~nferraz/activelock/
'Feel free to use this program in anyway you want.
'This code is provided as is without any warranty on any kind etc. bla bla bla.
'this is the second edition of TheLock the new name is DoubleLock
'Please send me your feed back for the third edition.
'Ahmed Hassan
' ahmedarmando@hotmail.com
' 5/4/1999
Option Explicit
Private Sub Command1_Click()
Unload Me
End
End Sub
Private Sub Form_Load()
'check if user is registered
Dim USER As String
USER = GetSetting("The Lock 2000", "Startup", "Registereduser", "")
If USER = "" Then
LOCKPROG 'call lock function
Else
End If
' display software code for the user even after register
'it is handy for the user to write down if he decide to register
'because no need to restart the program just to get the software code
'from login form
Label1.Caption = "Software Code: " & lckthelock.SoftwareCode
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
End
End Sub
Private Sub Timer3_Timer()
'if activated by Lockprog it deletes the settings
'Why? to make the diff = 0 case
'which will lock the program
'and simply unloads it.
DeleteSetting "The Lock 2000", "Startup", "stpd"
DeleteSetting "The Lock 2000", "Startup", "xpd"
MsgBox "Your Evaluation Period is over ! Either Register The Lock 2000 or remove it from your system. Thank you for trying The Lock 2000.", , "Thank you for trying The Lock 2000"
Unload Me
End
End Sub
Public Function LOCKPROG()
Dim DIFF As String, SD As String, ED As String
SD = GetSetting("The Lock 2000", "Startup", "STPD", "31/12/99")
ED = GetSetting("The Lock 2000", "Startup", "XPD", "31/12/99")
'make sure you 31/2/99 or similar in both of them
'in case the user delelte the settings form the registry
'this way you will have a diff = 0 case
'and the program will lock.
'get the dates and see the diff between them
'you can use Select Case but I wanted to make it very clear
DIFF = DateDiff("D", SD, ED)
If DIFF = 0 Then
Timer3.Interval = 100
Else
unreg1.Visible = True
unreg2.Visible = True
End If
If DIFF < 0 Then
Timer3.Interval = 100
End If
If DIFF > 30 Then
Timer3.Interval = 100
End If
unreg2.Caption = "Your Evaluation Period Expires After " & DIFF & " Day(s)"
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -