VERSION 5.00
Begin VB.Form frmTrial 
   Caption         =   "PPCalc - Trial Version Notice"
   ClientHeight    =   3435
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6420
   Icon            =   "frmTrial.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3435
   ScaleWidth      =   6420
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton Command1 
      Caption         =   "E&xit"
      Height          =   405
      Index           =   0
      Left            =   225
      TabIndex        =   3
      Top             =   2850
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "&Buy Now"
      Height          =   405
      Index           =   1
      Left            =   1770
      TabIndex        =   2
      Top             =   2850
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "&Enter Serial"
      Height          =   405
      Index           =   2
      Left            =   3300
      TabIndex        =   1
      Top             =   2850
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "&OK"
      Default         =   -1  'True
      Height          =   405
      Index           =   3
      Left            =   4845
      TabIndex        =   0
      Top             =   2850
      Width           =   1335
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "You are currently using the Trial Version of PPCalc."
      Height          =   195
      Index           =   0
      Left            =   210
      TabIndex        =   10
      Top             =   180
      Width           =   3600
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   $"frmTrial.frx":33E2
      Height          =   615
      Index           =   1
      Left            =   210
      TabIndex        =   9
      Top             =   555
      Width           =   6015
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Your current registration status is shown below:"
      Height          =   195
      Index           =   2
      Left            =   210
      TabIndex        =   8
      Top             =   1365
      Width           =   3315
   End
   Begin VB.Shape Shape1 
      Height          =   990
      Index           =   0
      Left            =   195
      Top             =   1665
      Width           =   6015
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Registration Status:"
      Height          =   195
      Index           =   3
      Left            =   480
      TabIndex        =   7
      Top             =   1845
      Width           =   1380
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Days Left in Trial:"
      Height          =   195
      Index           =   4
      Left            =   630
      TabIndex        =   6
      Top             =   2235
      Width           =   1230
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "30"
      Height          =   195
      Index           =   6
      Left            =   1965
      TabIndex        =   5
      Top             =   2235
      Width           =   180
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Unregistered Trial Version"
      Height          =   195
      Index           =   5
      Left            =   1965
      TabIndex        =   4
      Top             =   1845
      Width           =   1815
   End
End
Attribute VB_Name = "frmTrial"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click(Index As Integer)

Select Case Index
Case 0 'Exit
 Call EndTheProgram
Case 1 'Buy Now
 ShellExecute 0, vbNullString, "http://www.ppcalc.com/order.php", vbNullString, vbNullString, vbNormalFocus
Case 2 'Enter Serial
 Dim frm1 As frmSerialEntry
 Set frm1 = New frmSerialEntry
 Load frm1
 frm1.Show vbModal, Me
Case 3 'OK
 'Dim frm2 As Form1
 'Set frm2 = New Form1
 'Load frm2
 'frm2.Show
 
 'Load Form1
 'Form1.Show
  
 b_form.Show
 
 Unload Me
End Select
End Sub

Private Sub Form_Activate()

If GetSetting("PPCalc", "Settings", "Serial") <> "" And GetSetting("PPCalc", "Settings", "Name") <> "" Then
 If ValidatePassword(GetSetting("PPCalc", "Settings", "Serial")) = True Then
  Command1(1).Enabled = False
  Command1(2).Enabled = False
  Label1(4).Visible = False
  Label1(6).Caption = "*** Thank you for your purchase! ***"
  Label1(5).Caption = "Registered to " & GetSetting("PPCalc", "Settings", "Name")
  DeleteSetting "PPCalc", "Settings", "ExpDate"
  Command1(3).Enabled = True
 End If
End If

End Sub

Private Sub Form_Load()

'if ppc_logo.png does not exist, create it
'If Dir(AppPath & "ppc_logo.png", vbNormal Or vbArchive Or vbReadOnly Or vbHidden Or vbSystem) = "" Then
' Dim B() As Byte
' Dim FileNum As Integer
' B = LoadResData("LOGO", "PICS")
' FileNum = FreeFile
' Open AppPath & "ppc_logo.png" For Binary As #FileNum
'  Put #FileNum, 1, B()
' Close #FileNum
' Erase B
'End If

'load png if it exists
'If Dir(AppPath & "ppc_logo.png", vbNormal Or vbArchive Or vbReadOnly Or vbHidden Or vbSystem) <> "" Then
' Dim pngClass As New LoadPNG
' pngClass.PicBox = Picture1 'or Picturebox
' pngClass.SetToBkgrnd True, 0, 0 'set to Background (True or false), x and y
' pngClass.BackgroundPicture = Picture1 'same Backgroundpicture
' pngClass.SetAlpha = True 'when Alpha then alpha
' pngClass.SetTrans = True 'when transparent Color then transparent Color
' pngClass.OpenPNG AppPath & "ppc_logo.png" 'Open and display Picture
'End If

If GetSetting("PPCalc", "Settings", "ExpDate") <> "" Then
 If DateDiff("s", GetSetting("PPCalc", "Settings", "ExpDate"), Now) >= 0 Then
  'trial period has expired
  Command1(3).Enabled = False
  Label1(6).Caption = "-- Your trial period has expired -- "
 Else
  'trial version is still good
  Label1(6).Caption = Abs(DateDiff("d", GetSetting("PPCalc", "Settings", "ExpDate"), Now))
 End If
End If

End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
 Call DragEntireForm(Button, Shift, x, y, Me)
End Sub

Private Sub label1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
 Call DragEntireForm(Button, Shift, x, y, Me)
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
 Call DragEntireForm(Button, Shift, x, y, Me)
End Sub