lunes, 12 de noviembre de 2007

PEDIDO DE COMIDAS



CODIGO_______________________________________________________________ Private Sub Combo1_Click()
'este mostrara las frutas
If Combo1.Text = "manzana" Then
Text1.Text = "10"
Text6.Text = "500"
Else
If Combo1.Text = "pera" Then
Text1.Text = "15"
Text6.Text = "600"
End If
End If
If Combo1.Text = "mango" Then
Text1.Text = "12"
Text6.Text = "400"
Else
If Combo1.Text = "papaya" Then
Text1.Text = "13"
Text6.Text = "1500"
Else
If Combo1.Text = "lulo" Then
Text1.Text = "11"
Text6.Text = "700"
End If
End If
End If
End Sub
Private Sub Combo2_Click()
'este mostrara las bebidas
If Combo2.Text = "gaseosa" Then
Text2.Text = "15"
Text7.Text = "800"
Else
If Combo2.Text = "batido" Then
Text2.Text = "25"
Text7.Text = "1000"
End If
End If
If Combo2.Text = "jugo" Then
Text2.Text = "16"
Text7.Text = "800"
Else
If Combo2.Text = "cerveza" Then
Text2.Text = "5"
Text7.Text = "1100"
Else
If Combo2.Text = "vino" Then
Text2.Text = "9"
Text7.Text = "10000"
End If
End If
End If
End Sub
Private Sub Combo3_Click()
'este es de el postre
If Combo3.Text = "gelatina" Then
Text3.Text = "11"
Text8.Text = "600"
Else
If Combo3.Text = "tres leches" Then
Text3.Text = "50"
Text8.Text = "2000"
End If
End If
If Combo3.Text = "de piña" Then
Text3.Text = "45"
Text8.Text = "1500"
Else
If Combo3.Text = "torta fria" Then
Text3.Text = "70"
Text8.Text = "800"
Else
If Combo3.Text = "kiwi" Then
Text3.Text = "65"
Text8.Text = "700"
End If
End If
End If
End Sub
Private Sub Combo4_Click()
'este mostrara los helados
If Combo4.Text = "fresa" Then
Text4.Text = "22"
Text9.Text = "600"
Else
If Combo4.Text = "chocolate" Then
Text4.Text = "42"
Text9.Text = "500"
End If
End If
If Combo4.Text = "bocato" Then
Text4.Text = "43"
Text9.Text = "2000"
Else
If Combo4.Text = "cono" Then
Text4.Text = "26"
Text9.Text = "800"
Else
If Combo3.Text = "paleta" Then
Text3.Text = "16"
Text9.Text = "700"
End If
End If
End If
End Sub

Private Sub Command1_Click()
'boton salir
End
End Sub

Private Sub Command2_Click()
'boton borrar
Combo1.Text = ""
Combo2.Text = ""
Combo3.Text = ""
Combo4.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
End Sub

Private Sub Form_Load()
'con este codigo adisionamos los nombres de cada objeto a la herramienta combobox
Combo1.AddItem "manzana"
Combo1.AddItem "pera"
Combo1.AddItem "mango"
Combo1.AddItem "papaya"
Combo1.AddItem "lulo"
Combo2.AddItem "gaseosa"
Combo2.AddItem "batido"
Combo2.AddItem "jugo"
Combo2.AddItem "cerveza"
Combo2.AddItem "vino"
Combo3.AddItem "gelatina"
Combo3.AddItem "tres leches"
Combo3.AddItem "de piña"
Combo3.AddItem "torta fria"
Combo3.AddItem "kiwi"
Combo4.AddItem "fresa"
Combo4.AddItem "chocolate"
Combo4.AddItem "bocato"
Combo4.AddItem "cono"
Combo4.AddItem "paleta"
End Sub
'los soguientes son para mostrar los resultados del pedido
Private Sub Label6_Click()
Text5.Text = Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) + Val(Text4.Text)
End Sub

Private Sub Label7_Click()
Text10.Text = Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text9.Text)
End Sub

Private Sub Label8_Click()
Text11.Text = (Val(Text10.Text) * 16) / 100
End Sub

Private Sub Label9_Click()
Text12.Text = Val(Text11.Text) + Val(Text10.Text)
End Sub