VERSION 5.00
Begin VB.Form frmEmpty 
   Caption         =   "Empty"
   ClientHeight    =   2250
   ClientLeft      =   10815
   ClientTop       =   5430
   ClientWidth     =   2295
   BeginProperty Font 
      Name            =   "Arial"
      Size            =   12
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   ScaleHeight     =   2250
   ScaleWidth      =   2295
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton cmdVaciar 
      Caption         =   "Empty"
      Height          =   360
      Left            =   397
      TabIndex        =   3
      Top             =   1620
      Width           =   1500
   End
   Begin VB.OptionButton OptBilletes 
      Caption         =   "Notes"
      Height          =   345
      Left            =   300
      TabIndex        =   2
      Top             =   1050
      Width           =   1515
   End
   Begin VB.OptionButton OptMonedas 
      Caption         =   "Coins"
      Height          =   435
      Left            =   300
      TabIndex        =   1
      Top             =   600
      Width           =   1515
   End
   Begin VB.OptionButton OptTodo 
      Caption         =   "All"
      Height          =   375
      Left            =   300
      TabIndex        =   0
      Top             =   270
      Width           =   1515
   End
End
Attribute VB_Name = "frmEmpty"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public CB As Boolean

Private Sub cmdVaciar_Click()
    Dim ok As Boolean
    
    If CB Then
        If OptTodo.Value Then
            ok = CK.EmptyCashBox(LCCB_All)
        ElseIf OptMonedas.Value Then
            ok = CK.EmptyCashBox(LCCB_Coins)
        Else
            ok = CK.EmptyCashBox(LCCB_Notes)
        End If
        If ok = False Then
            MsgBox "Error EmptyCashBox"
        End If
    Else
        If OptTodo.Value Then
            ok = CK.EmptyDevice(LCCB_All)
        ElseIf OptMonedas.Value Then
            ok = CK.EmptyDevice(LCCB_Coins)
        Else
            ok = CK.EmptyDevice(LCCB_Notes)
        End If
        If ok = False Then
            MsgBox "Error EmptyDevice"
        End If
    End If
    Unload Me
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyEscape Then
        Unload Me
    End If
End Sub

Private Sub Form_Load()
    CentraForm Me
    OptTodo.Value = True
    If CB Then
        'Me.Caption = "Vaciado CashBox"
        Me.Caption = "Empty CashBox"
    Else
        'Me.Caption = "Vaciado completo"
        Me.Caption = "Empty Complete"
    End If
End Sub
