figured it out, wil be uploading registration form soon.
Sub reg ' complete registration manager in one sub
regdt=Date(Now)
ErrorLabel(Err1)
If FileExist ("c:\windows\clrbn.txt") = true Then 'opens registration file information
FileOpen (c1,"c:\windows\clrbn.txt",cRead)
r = FileRead (c1)
FileClose (c1)
Else
regdt=Date(Now)
FileOpen (c1,"c:\windows\clrbn.txt",cWrite) 'creates registration file information
FileWrite (c1,regdt)
FileClose (c1)
End If
textbox1.Text=r ' Displays Registration Date
textbox3.text=Date(Now) ' Displays Today Date
x = DateParse (r) ' converts install date to ticks
rd=DateAdd(x, 0, 1, 0)'sets reg duration in ticks (Ticks, Years, Months, Days)for one month
textbox2.text=Date(rd) ' converts ticks to date and Displays Registration Expires Date
td=Now ' todays date in ticks
textbox4.text=rd 'displays regticks
textbox5.text=rd 'dis[lays expticks
textbox6.text=td 'displays todayticks
If rd < td Then Msgbox("Registration Expired, Contact Support for Registered Version, Contact
scott93727@aol.com")' if date now later then regdate by 1 month
If rd < td Then Goto regctl Else Goto regend
Goto regend
err1:
Msgbox("Registration Error, Contact Support,
scott93727@aol.com")
regctl:
Form1.Text = "Registration expired, Contact Support"
textbox7.Text="Registration expired...Contact Support at
scott93727@aol.com"
'rc=1 (Declare global rc=0) for Control code (what to disable after reg. expires))
' example if rc = 1 then close form1
Goto rged
regend:
Form1.Text = "Registration Period Active..."
textbox7.Text=" Registration Period Active..."
rged:
End Sub