VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H00FFC0FF&
   Caption         =   "The Wedding Booth - Clients"
   ClientHeight    =   8790
   ClientLeft      =   2160
   ClientTop       =   1170
   ClientWidth     =   7500
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   NegotiateMenus  =   0   'False
   ScaleHeight     =   8790
   ScaleWidth      =   7500
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox Text2 
      Height          =   6495
      Left            =   120
      TabIndex        =   3
      Text            =   "Client Information And Details..."
      Top             =   1920
      Width           =   7215
   End
   Begin VB.ListBox List1 
      Height          =   1035
      ItemData        =   "Clients.frx":0000
      Left            =   120
      List            =   "Clients.frx":0002
      TabIndex        =   2
      Top             =   480
      Width           =   3495
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Add"
      Height          =   255
      Left            =   3120
      TabIndex        =   1
      Top             =   120
      Width           =   495
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   120
      TabIndex        =   0
      Text            =   "Add Client Names..."
      Top             =   120
      Width           =   2895
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
    List1.AddItem Text1.Text
    Text1.SetFocus
    
        
    Dim i As Integer

    If List1.ListCount = 0 Then Exit Sub
    
    Open App.Path & "clients.txt" For Output As #1
        For i = 0 To List1.ListCount - 1
            Print #1, List1.List(i)
        Next i
    Close #1
    
    Open App.Path & Text1.Text & ".txt" For Append As #2
    Print #2, "Names: " & Text1.Text
    Close #2
    
End Sub

Private Sub List1_Click()

        Open App.Path & List1.Text & ".txt" For Input As #3
         Input #3, Text2.Text
        Close #3
        
End Sub

'populate list when form loads
Private Sub Form_Load()
Dim strLine As String

    If Not Dir(App.Path & "clients.txt") = "" Then
        Open App.Path & "clients.txt" For Input As #1
            Do While Not EOF(1)
                Line Input #1, strLine
                List1.AddItem strLine
            Loop
        Close #1
    End If

End Sub
