VERSION 2.00
Begin Form Pad 
   BorderStyle     =   3  'Fixed Double
   Caption         =   "SecuriPad 3.4"
   ClientHeight    =   3900
   ClientLeft      =   1050
   ClientTop       =   1365
   ClientWidth     =   1890
   Height          =   4305
   Left            =   990
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3900
   ScaleWidth      =   1890
   Top             =   1020
   Width           =   2010
   Begin CommandButton pbTransmit 
      BackColor       =   &H000000FF&
      Caption         =   "TRANSMIT"
      Height          =   375
      Left            =   240
      TabIndex        =   15
      Top             =   3360
      Width           =   1455
   End
   Begin CommandButton pbClearAll 
      Caption         =   "Clear All"
      Height          =   375
      Left            =   240
      TabIndex        =   14
      Top             =   2880
      Width           =   1455
   End
   Begin CommandButton pbClearEntry 
      Caption         =   "Clear Entry"
      Height          =   375
      Left            =   240
      TabIndex        =   13
      Top             =   2520
      Width           =   1455
   End
   Begin CommandButton pb12 
      Height          =   495
      Left            =   1200
      TabIndex        =   11
      Top             =   1920
      Width           =   495
   End
   Begin CommandButton pb2 
      Height          =   495
      Left            =   720
      TabIndex        =   1
      Top             =   480
      Width           =   495
   End
   Begin CommandButton pb3 
      Height          =   495
      Left            =   1200
      TabIndex        =   2
      Top             =   480
      Width           =   495
   End
   Begin CommandButton pb4 
      Height          =   495
      Left            =   240
      TabIndex        =   3
      Top             =   960
      Width           =   495
   End
   Begin CommandButton pb5 
      Height          =   495
      Left            =   720
      TabIndex        =   4
      Top             =   960
      Width           =   495
   End
   Begin CommandButton pb6 
      Height          =   495
      Left            =   1200
      TabIndex        =   5
      Top             =   960
      Width           =   495
   End
   Begin CommandButton pb7 
      Height          =   495
      Left            =   240
      TabIndex        =   6
      Top             =   1440
      Width           =   495
   End
   Begin CommandButton pb8 
      Height          =   495
      Left            =   720
      TabIndex        =   7
      Top             =   1440
      Width           =   495
   End
   Begin CommandButton pb9 
      Height          =   495
      Left            =   1200
      TabIndex        =   8
      Top             =   1440
      Width           =   495
   End
   Begin CommandButton pb10 
      Height          =   495
      Left            =   240
      TabIndex        =   9
      Top             =   1920
      Width           =   495
   End
   Begin CommandButton pb11 
      Height          =   495
      Left            =   720
      TabIndex        =   10
      Top             =   1920
      Width           =   495
   End
   Begin CommandButton pb1 
      Height          =   495
      Left            =   240
      TabIndex        =   0
      Top             =   480
      Width           =   495
   End
   Begin Label Label1 
      BorderStyle     =   1  'Fixed Single
      Height          =   255
      Left            =   240
      TabIndex        =   12
      Top             =   120
      Width           =   1455
   End
End
Option Explicit

Sub Form_Activate ()
    Dim t1$, t2$, i, p, Done
    t1$ = "1234567890*#"
    t2$ = ""
    Randomize
    For i = 1 To 12
        Done = False
        While Not Done
            p = Int((12 * Rnd) + 1)
            If Mid$(t1$, p, 1) <> " " Then
                t2$ = t2$ + Mid$(t1$, p, 1)         ' put the P component into t2$
                If p < 12 Then
                    t1$ = Mid$(t1$, 1, p - 1) + " " + Mid$(t1$, p + 1, 12 - p)
                Else
                    t1$ = Left$(t1$, 11) + " "
                End If
                Done = True
            End If
        Wend
    Next i
    pb1.Caption = Mid$(t2$, 1, 1)
    pb2.Caption = Mid$(t2$, 2, 1)
    pb3.Caption = Mid$(t2$, 3, 1)
    pb4.Caption = Mid$(t2$, 4, 1)
    pb5.Caption = Mid$(t2$, 5, 1)
    pb6.Caption = Mid$(t2$, 6, 1)
    pb7.Caption = Mid$(t2$, 7, 1)
    pb8.Caption = Mid$(t2$, 8, 1)
    pb9.Caption = Mid$(t2$, 9, 1)
    pb10.Caption = Mid$(t2$, 10, 1)
    pb11.Caption = Mid$(t2$, 11, 1)
    pb12.Caption = Mid$(t2$, 12, 1)
    Pad.Refresh
End Sub

Sub Form_Click ()
    Form_Activate
End Sub

Sub pb1_Click ()
    Label1.Caption = Label1.Caption + pb1.Caption
    Form_Activate
End Sub

Sub pb10_Click ()
    Label1.Caption = Label1.Caption + pb10.Caption
    Form_Activate
End Sub

Sub pb11_Click ()
    Label1.Caption = Label1.Caption + pb11.Caption
    Form_Activate
End Sub

Sub pb12_Click ()
    Label1.Caption = Label1.Caption + pb12.Caption
    Form_Activate
End Sub

Sub pb2_Click ()
    Label1.Caption = Label1.Caption + pb2.Caption
    Form_Activate
End Sub

Sub pb3_Click ()
    Label1.Caption = Label1.Caption + pb3.Caption
    Form_Activate
End Sub

Sub pb4_Click ()
    Label1.Caption = Label1.Caption + pb4.Caption
    Form_Activate
End Sub

Sub pb5_Click ()
    Label1.Caption = Label1.Caption + pb5.Caption
    Form_Activate
End Sub

Sub pb6_Click ()
    Label1.Caption = Label1.Caption + pb6.Caption
    Form_Activate
End Sub

Sub pb7_Click ()
    Label1.Caption = Label1.Caption + pb7.Caption
    Form_Activate
End Sub

Sub pb8_Click ()
    Label1.Caption = Label1.Caption + pb8.Caption
    Form_Activate
End Sub

Sub pb9_Click ()
    Label1.Caption = Label1.Caption + pb9.Caption
    Form_Activate
End Sub

Sub pbClearAll_Click ()
    Label1.Caption = ""
    Form_Activate
End Sub

Sub pbClearEntry_Click ()
    If Len(Label1.Caption) > 0 Then
        Label1.Caption = Left$(Label1.Caption, Len(Label1.Caption) - 1)
    Else
        Beep
    End If
    Form_Activate
End Sub

