VERSION 5.00
Begin VB.Form Precio 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Cambiar Precio"
   ClientHeight    =   4665
   ClientLeft      =   2505
   ClientTop       =   3855
   ClientWidth     =   5565
   Icon            =   "Precio.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   4665
   ScaleWidth      =   5565
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton Command3 
      Caption         =   "SALIR"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   3840
      TabIndex        =   5
      Top             =   3840
      Width           =   1455
   End
   Begin VB.CommandButton Command2 
      Caption         =   "BORRAR"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   2040
      TabIndex        =   4
      Top             =   3840
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "ACTUALIZAR"
      Default         =   -1  'True
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   240
      TabIndex        =   3
      Top             =   3840
      Width           =   1455
   End
   Begin VB.TextBox nPrecio 
      BackColor       =   &H00000000&
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   18
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   645
      Left            =   240
      MaxLength       =   6
      TabIndex        =   2
      Top             =   2880
      Width           =   5055
   End
   Begin VB.TextBox nTicket 
      BackColor       =   &H00000000&
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   18
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   645
      Left            =   240
      MaxLength       =   20
      TabIndex        =   1
      Top             =   1680
      Width           =   5055
   End
   Begin VB.TextBox nBoton 
      BackColor       =   &H00000000&
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   18
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   645
      Left            =   240
      MaxLength       =   20
      TabIndex        =   0
      Top             =   480
      Width           =   5055
   End
   Begin VB.Frame Frame1 
      Caption         =   "BOTON"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1095
      Left            =   120
      TabIndex        =   6
      Top             =   120
      Width           =   5295
   End
   Begin VB.Frame Frame2 
      Caption         =   "TICKET"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1095
      Left            =   120
      TabIndex        =   7
      Top             =   1320
      Width           =   5295
   End
   Begin VB.Frame Frame3 
      Caption         =   "PRECIO"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1095
      Left            =   120
      TabIndex        =   8
      Top             =   2520
      Width           =   5295
   End
End
Attribute VB_Name = "Precio"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    
    TablaPrecios.Edit
    
    TablaPrecios("boton") = ("" & nBoton)
    TablaPrecios("ticket") = ("" & nTicket)
    TablaPrecios("precio") = ("0" & nPrecio)
    TablaPrecios.Update

    Panel.Command2.BackColor = &H8000000F
    modificar = False
    nombrebotones (seleccion)
    
    Unload Me
End Sub

Private Sub Command2_Click()
    nBoton.Text = ""
    nTicket.Text = ""
    nPrecio.Text = ""
End Sub


Private Sub Command3_Click()
    Unload Me
      '  Me.Visible = False

End Sub



Private Sub Form_Load()
   ' Show
   ' nBoton.SetFocus
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Panel.Command2.BackColor = &H8000000F
    modificar = False
    nombrebotones (seleccion)
    
End Sub



Private Sub nBoton_Change()
    nTicket = nBoton
End Sub

Private Sub nBoton_GotFocus()
    nBoton.SelStart = 0
    nBoton.SelLength = Len(nBoton.Text)
End Sub

Private Sub nPrecio_KeyPress(KeyAscii As Integer)
'solo admitirá dígitos, el punto y la coma
'si se pulsa alguna otra tecla, anulará la pulsación de teclado
If InStr("0123456789,", Chr(KeyAscii)) = 0 Then
    If KeyAscii <> 8 Then
            KeyAscii = 0
    End If
   
End If
End Sub

Private Sub nTicket_GotFocus()
    nTicket.SelStart = 0
    nTicket.SelLength = Len(nTicket.Text)
End Sub

Private Sub nPrecio_GotFocus()
    nPrecio.SelStart = 0
    nPrecio.SelLength = Len(nPrecio.Text)
End Sub
