Programacion Visual Basic Combobox

Páginas: 2 (261 palabras) Publicado: 28 de septiembre de 2011
Public Class Form1
Dim cant1 As Integer
Dim op_carne As Integer
Dim st_carne, st_acom, st_ens, st_refre As Single
Dim precioc, precioa As Single

Private Subcombo_carne_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles combo_carne.SelectedIndexChanged

Dim nom_carne As String

op_carne = combo_carne.SelectedIndexnom_carne = CStr(combo_carne.SelectedItem)

Select Case op_carne
Case 0 : precioc = 23.95
Case 1 : precioc = 24.67
Case 2 : precioc = 26.5End Select

MsgBox("La carne que eligio fue " & nom_carne)

pu_carne.Text = CStr(precioc)
canti_carne.Enabled = True

End Sub


Private Subcanti_carne_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles canti_carne.LostFocus

st_carne = CSng(precioc * CDbl(canti_carne.Text))
subt_carne.Text = CStr(st_carne)

EndSub

Private Sub como_acom_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles como_acom.SelectedIndexChanged
Dim op_acom As Integer
Dimnom_acom As String

op_acom = como_acom.SelectedIndex
nom_acom = CStr(como_acom.SelectedItem)

Select Case op_acom
Case 0 : precioa = 17.95
Case 1 :precioa = 20.67
Case 2 : precioa = 16.5
End Select

MsgBox("El acompañamiento que eligio fue " & nom_acom)

pu_acom.Text = CStr(precioa)canti_acom.Enabled = True
End Sub

Private Sub canti_acom_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles canti_acom.LostFocus
st_acom = CSng(precioa * CDbl(canti_acom.Text))subt_acom.Text = CStr(st_acom)
End Sub


Private Sub btn_calcular_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_calcular.Click
Dim total As...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • introduccion a la programacion visual basic
  • Lenguage De Programacion Visual Basic
  • Manual De Programación En Visual Basic
  • Programacion en visual basic
  • Programación Con Visual Basic
  • Programación En Visual Basic
  • LENGUAJE DE PROGRAMACIÓN VISUAL BASIC
  • Programacion visual basic

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS