VERSION 5.00
Begin VB.Form frmCajaRegistradora 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Caja Registradora"
   ClientHeight    =   8430
   ClientLeft      =   150
   ClientTop       =   435
   ClientWidth     =   10905
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   8430
   ScaleWidth      =   10905
   StartUpPosition =   2  'CenterScreen
   WindowState     =   2  'Maximized
   Begin VB.TextBox txtTarjeta 
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00800000&
      Height          =   270
      Left            =   1575
      MaxLength       =   10
      TabIndex        =   47
      Text            =   "1234567890"
      Top             =   2130
      Width           =   1305
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "CC"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   41
      Left            =   9075
      TabIndex        =   45
      Top             =   2835
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto40"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   40
      Left            =   7200
      TabIndex        =   44
      Top             =   6855
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto39"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   39
      Left            =   6225
      TabIndex        =   43
      Top             =   6855
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto38"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   38
      Left            =   5250
      TabIndex        =   42
      Top             =   6855
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto37"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   37
      Left            =   4275
      TabIndex        =   41
      Top             =   6855
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto36"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   36
      Left            =   3300
      TabIndex        =   40
      Top             =   6855
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto35"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   35
      Left            =   2325
      TabIndex        =   39
      Top             =   6855
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto34"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   34
      Left            =   1350
      TabIndex        =   38
      Top             =   6855
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto33"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   33
      Left            =   375
      TabIndex        =   37
      Top             =   6855
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto32"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   32
      Left            =   7200
      TabIndex        =   36
      Top             =   5850
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto31"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   31
      Left            =   6225
      TabIndex        =   35
      Top             =   5850
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto30"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   30
      Left            =   5250
      TabIndex        =   34
      Top             =   5850
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto29"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   29
      Left            =   4275
      TabIndex        =   33
      Top             =   5850
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto28"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   28
      Left            =   3300
      TabIndex        =   32
      Top             =   5850
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto27"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   27
      Left            =   2325
      TabIndex        =   31
      Top             =   5850
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto26"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   26
      Left            =   1350
      TabIndex        =   30
      Top             =   5850
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto25"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   25
      Left            =   375
      TabIndex        =   29
      Top             =   5850
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto24"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   24
      Left            =   7200
      TabIndex        =   28
      Top             =   4845
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto23"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   23
      Left            =   6225
      TabIndex        =   27
      Top             =   4845
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto22"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   22
      Left            =   5250
      TabIndex        =   26
      Top             =   4845
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto21"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   21
      Left            =   4275
      TabIndex        =   25
      Top             =   4845
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto20"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   20
      Left            =   3300
      TabIndex        =   24
      Top             =   4845
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto19"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   19
      Left            =   2325
      TabIndex        =   23
      Top             =   4845
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto18"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   18
      Left            =   1350
      TabIndex        =   22
      Top             =   4845
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto17"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   17
      Left            =   375
      TabIndex        =   21
      Top             =   4845
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto16"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   16
      Left            =   7200
      TabIndex        =   20
      Top             =   3840
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto15"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   15
      Left            =   6225
      TabIndex        =   19
      Top             =   3840
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto14"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   14
      Left            =   5250
      TabIndex        =   18
      Top             =   3840
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto13"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   13
      Left            =   4275
      TabIndex        =   17
      Top             =   3840
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   " Cod. Prod."
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   0
      Left            =   9075
      TabIndex        =   16
      Top             =   5520
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   " Ver Orden"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   42
      Left            =   9060
      TabIndex        =   15
      Top             =   4170
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "AC/TC"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   24
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   43
      Left            =   8580
      TabIndex        =   14
      Top             =   6855
      Width           =   1965
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto12"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   12
      Left            =   3300
      TabIndex        =   13
      Top             =   3840
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto11"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   11
      Left            =   2325
      TabIndex        =   12
      Top             =   3840
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto10"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   10
      Left            =   1350
      TabIndex        =   11
      Top             =   3840
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto9"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   9
      Left            =   375
      TabIndex        =   10
      Top             =   3840
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto8"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   8
      Left            =   7200
      TabIndex        =   9
      Top             =   2835
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto7"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   7
      Left            =   6225
      TabIndex        =   8
      Top             =   2835
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto6"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   6
      Left            =   5250
      TabIndex        =   7
      Top             =   2835
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto5"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   5
      Left            =   4275
      TabIndex        =   6
      Top             =   2835
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto4"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   4
      Left            =   3300
      TabIndex        =   5
      Top             =   2835
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto3"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   3
      Left            =   2325
      TabIndex        =   4
      Top             =   2835
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto2"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   2
      Left            =   1350
      TabIndex        =   3
      Top             =   2835
      Width           =   975
   End
   Begin VB.CommandButton cmdTecla 
      Caption         =   "Producto1"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1005
      Index           =   1
      Left            =   375
      TabIndex        =   2
      Top             =   2835
      Width           =   975
   End
   Begin VB.TextBox txtCantidad 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00000000&
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   24
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   1155
      Left            =   4230
      TabIndex        =   0
      Top             =   480
      Width           =   2115
   End
   Begin VB.Label lblSubtotal 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   24
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   1155
      Left            =   6690
      TabIndex        =   49
      Top             =   480
      Width           =   2955
   End
   Begin VB.Label lblCliente 
      Caption         =   "Nombres y Apellidos del Cliente"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00800000&
      Height          =   495
      Left            =   2970
      TabIndex        =   48
      Top             =   2145
      Width           =   5175
      WordWrap        =   -1  'True
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "Tarjeta :"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   435
      TabIndex        =   46
      Top             =   2160
      Width           =   1080
   End
   Begin VB.Label lblProducto 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00000000&
      BorderStyle     =   1  'Fixed Single
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   24
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   1155
      Left            =   1200
      TabIndex        =   1
      Top             =   480
      Width           =   2970
   End
   Begin VB.Shape Shape1 
      BackColor       =   &H00000000&
      BorderColor     =   &H80000009&
      FillStyle       =   0  'Solid
      Height          =   1665
      Left            =   1005
      Top             =   225
      Width           =   8895
   End
End
Attribute VB_Name = "frmCajaRegistradora"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim TeclaRapida(50) As Long

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

'SHIFT
'-----
'1, se está pulsando la tecla Shift (mayúsculas)
'2, se está pulsando Control
'4, se está pulsando Alt
'3, se están pulsando Shift y Ctrl,
'5, se están pulsando Shift y Alt,
'6, se están pulsando Ctrl y Alt,
'7, se están pulsando las tres teclas.

  Select Case Shift
  
    Case 0
      Select Case KeyCode
        Case 112 To 123
          Call cmdTecla_Click(KeyCode - 111)
      End Select
    Case Else
    
    MsgBox "algo paso"
  End Select
End Sub

Private Sub Form_Load()
    
  On Error GoTo LineaError

  Screen.MousePointer = vbHourglass
  
  Dim sSQL As String
  Dim ADORS As ADODB.Recordset
  Dim i As Long, j As Long
  Dim iInicio As Long, iFin As Long
  Dim sTecla1 As String, sTecla2 As String, sTecla3 As String
  
  sSQL = " SELECT C.cTeclCode, C.sTeclDesc, C.sTeclRapd, C.cTeclFlagAsig, C.cProdCode," & _
         " P.sProdDescCrta" & _
         " FROM ConfiguracionTeclado AS C LEFT JOIN Producto AS P ON C.cProdCode = P.cProdCode"

  If Not oDBAdmin.EjecutarConsulta(ADOCnn, sSQL, ADORS) Then GoTo Salir
  
  i = 0 ' Controla el indice del control Tecla
  j = 0 ' Controla el id de la tecla rápida asignada
  
  Do While Not ADORS.EOF
    
    'Captura el texto de la BD o la descripcion del producto asociado
    
    If LeerCampo(ADORS("cProdCode")) = "" Then
      cmdTecla(i).Caption = LeerCampo(ADORS("sTeclDesc"))
    Else
      cmdTecla(i).Caption = LeerCampo(ADORS("sProdDescCrta"))
    End If
    
    'Asigna las teclas rápidas asignadas
    If LeerCampo(ADORS("cTeclFlagAsig")) = "1" Then
      
      'RegistrarTeclasRapidas i, j, LeerCampo(ADORS("sTeclRapd"))
      
      sTeclas = LeerCampo(ADORS("sTeclRapd"))
      
      iInicio = 1
      iFin = InStr(iInicio, sTeclas, "|")
      sTecla1 = Mid(sTeclas, iInicio, iFin - iInicio)
  
      iInicio = iFin + 1
      iFin = InStr(iInicio, sTeclas, "|")
      sTecla2 = Mid(sTeclas, iInicio, iFin - iInicio)
  
      RegisterHotKey Me.hwnd, j, CLng(sTecla1), CLng(sTecla2)
   
      TeclaRapida(j) = i
    
      j = j + 1
    End If
    
    i = i + 1
    ADORS.MoveNext
  Loop
  
  glWinRet = SetWindowLong(Me.hwnd, GWL_WNDPROC, AddressOf CallbackMsgs)
  
  Screen.MousePointer = vbDefault
  
  GoTo Salir
  
LineaError:
  MsgBox Err.Description, vbOKOnly + vbInformation
  Screen.MousePointer = vbDefault

Salir:
  Set ADORS = Nothing
  
End Sub

Public Sub cmdTecla_Click(Index As Integer)
  
  Select Case Index
    Case 0
      MsgBox "Ingrese el código del producto"
    Case 1 To 40
      CapturaDatosProducto TeclaRapida(Index)
    Case 41
    Case 42
    Case 43
  End Select
   
End Sub

Sub CapturaDatosProducto(iProducto As Long)
  On Error GoTo LineaError
  
  Dim sSQL As String
  Dim ADORS As ADODB.Recordset
  Dim i As Long, j As Long
  
  sSQL = " SELECT sProdDescCrta, nProdPrecUnit" & _
         " FROM Producto" & _
         " WHERE cProdCode =" & iProducto

  If Not oDBAdmin.EjecutarConsulta(ADOCnn, sSQL, ADORS) Then GoTo Salir
  
  i = 0 ' Controla el indice del control Tecla
  j = 0 ' Controla el id de la tecla rápida asignada
  
  If ADORS.RecordCount = 1 Then
    lblProducto.Caption = Left(LeerCampo(ADORS("sProdDescCrta")) + "          ", 10) + _
                          Right("          " + CStr(LeerCampo(ADORS("nProdPrecUnit"))), 10)
    txtCantidad.Text = "1"
  End If
  
  GoTo Salir
  
LineaError:
  MsgBox Err.Description, vbOKOnly + vbInformation
  Screen.MousePointer = vbDefault

Salir:
  Set ADORS = Nothing
  
End Sub

Private Sub txtCantidad_Change()
   If Trim(txtCantidad.Text) = "" Then txtCantidad.Text = "0"
   
   iCantidad = Val(txtCantidad.Text)
   iPUnitario = Val(Trim(Right(lblProducto.Caption, 10)))
   lblSubtotal.Caption = Format(CStr(iCantidad * iPUnitario), "###,###,###,##0.00")
End Sub

Private Sub txtCantidad_KeyPress(KeyAscii As Integer)
   On Error GoTo LineaError
   Dim iCantidad As Double
   Dim iPUnitario As Double
   Call ValidKeyPress(KeyAscii, kVKP_NUMERIC_INTEGER_ONLY)
   
   Exit Sub

LineaError:
   MsgBox Err.Description, vbOKOnly + vbInformation
End Sub

