Administrador

Solo disponible en BuenasTareas
  • Páginas : 2 (324 palabras )
  • Descarga(s) : 0
  • Publicado : 12 de mayo de 2011
Leer documento completo
Vista previa del texto
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.ShowDialog()

End Sub

Private SubButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim subtotal As Integer
Dim descuento As Integer
Dim impuesto As IntegerDim total As Integer
Dim i As Integer

Try

For i = 0 To ListView1.Items.Count - 1
If ListView1.Items(i).Checked = True Thensubtotal = subtotal + CInt(ListView1.Items(i).SubItems(1).Text)
End If
Next

TextBox1.Text = subtotal
descuento = CInt(TextBox2.Text)subtotal = subtotal - (subtotal * (descuento / 100))
impuesto = subtotal * 0.12
total = subtotal + impuesto

TextBox3.Text = impuestoTextBox4.Text = total
Catch ex As Exception

End Try
End Sub
End Class

Public Class Form2

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles MyBase.Load
ComboBox1.Items.Add("CPU Core Duo")
ComboBox1.Items.Add("AMD")
ComboBox1.Items.Add("Celeron")
ComboBox1.Items.Add("Impresora")ComboBox1.Items.Add("Mouse")
ComboBox1.Items.Add("Teclado")
ComboBox1.Items.Add("Parlantes")
ComboBox1.Items.Add("Scanner")
End Sub

Private SubComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedItem = "CPU Core Duo" Then
TextBox1.Text = "5000"End If
If ComboBox1.SelectedItem = "AMD" Then
TextBox1.Text = "4500"
End If
If ComboBox1.SelectedItem = "Celeron" Then
TextBox1.Text = "3000"...
tracking img