One very simple way would be to use the vb registry commands GETSETTING and SAVESETTING.
In the form load event (or the main module code), add the following (untested, though it should work) code.
Dim dtStart as Date
Dim strStart as String
strStart = Getsetting (App.ExeName, "SETTINGS", "START", "")
If strStart = "" then
' First Time the App has been Run, so save the time in the registry & continue
SaveSetting App.ExeName, "SETTINGS", "START", cStr(Now()
If DateDiff ("d",dtStart,Now()) > 3 then
MsgBox "This app has been installed for more than 3 days, you BAD Boy!"
Dim f as frm
for each f in Forms
' The app has been installed for less than three days, so it's OK to run
' so, do nothing & continue on
MsgBox "This app is running on it's three day trial period, which began" & strStart & "."
Last edited by loquin; 10-21-04 at 19:15.
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert