COLEGIO MUNICIPAL HUMBERTO MATA MARTINEZ
PROGRAMACION LIC : RODRIGO MULLO
PAUL LIGÑA 2do DE BACH TECNICO 2012 - 2013
HORAS MINUTOS Y SEGUNDOS
Public Class Form1 Dim COMBER As Double Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click End Sub Private Sub cal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cal.Click COMBER = Val(TextBox1.Text) TextBox2.Text = COMBER * 60 TextBox3.Text = COMBER * 3600 End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub Private Sub l1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles l1.Click TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() End Sub Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged COMBER = Val(TextBox1.Text) End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End End Sub End Class
DIAS, HORAS MINUTOS Y SEGUNDOS
Public Class Form1 Dim COMBER As Double
Private Sub cal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cal.Click COMBER = Val(TextBox4.Text) TextBox1.Text = COMBER * 24 TextBox2.Text = COMBER * 1440 TextBox3.Text = COMBER * 86400 End Sub Private Sub l1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles l1.Click TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox4.Clear() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End End Sub End Class
CONVERTIR A DOLARES A EUROS
Public Class Form1 Dim COMBER As Double Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click COMBER = Val(TextBox1.Text) TextBox2.Text = COMBER * 0.772778
End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Clear() TextBox2.Clear() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End End Sub End Class
CONVERTIR A DOLARES A TODOS LOS PAISES
Public Class Form1 Dim COMBER As Double Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click COMBER = Val(TextBox1.Text) TextBox2.Text = COMBER * 0.772778 TextBox3.Text = COMBER * 12.4659 TextBox4.Text = COMBER * 95.8985 TextBox5.Text = COMBER * 1.50201 TextBox6.Text = COMBER * 10.5674 TextBox7.Text = COMBER * 6.95974
End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Clear() TextBox2.Clear() End Sub
End Class
AREA DE UN TRIANGULO
Public Class Form1 Dim BAS As Double Dim ALT As Double Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click BAS = Val(TextBox1.Text) ALT = Val(TextBox2.Text) TextBox3.Text = (BAS * ALT) / 2
End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub End Class
AREA PERIMETRO DE UN TRIANGULO
Public Class Form1 Dim BAS As Double Dim ALT As Double Dim per1 As Double Dim per2 As Double Dim per3 As Double Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click BAS = Val(TextBox1.Text) ALT = Val(TextBox2.Text) per1 = Val(TextBox4.Text) per2 = Val(TextBox5.Text) per3 = Val(TextBox6.Text) TextBox3.Text = (BAS * ALT) / 2 TextBox7.Text = per1 + per2 + per3
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox4.Clear() TextBox5.Clear() TextBox6.Clear() TextBox7.Clear() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub End Class
AREA PERIMETRO DE UN CUADRADO
Public Class Form1 Dim BAS As Double Dim ALT As Double Dim per1 As Double Dim per2 As Double Dim per3 As Double Dim per4 As Double Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click BAS = Val(TextBox1.Text) ALT = Val(TextBox2.Text) per1 = Val(TextBox4.Text) per2 = Val(TextBox5.Text) per3 = Val(TextBox6.Text) per4 = Val(TextBox8.Text) TextBox3.Text = (BAS * ALT) TextBox7.Text = per1 + per2 + per3 + per4
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox4.Clear() TextBox5.Clear() TextBox6.Clear() TextBox7.Clear() TextBox8.Clear() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub End Class
AREA PERIMETRO DEL RECTANGULO
Public Class Form1 Dim BAS As Double Dim ALT As Double Dim per1 As Double Dim per2 As Double Dim per3 As Double Dim per4 As Double Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click BAS = Val(TextBox1.Text) ALT = Val(TextBox2.Text) per1 = Val(TextBox4.Text) per2 = Val(TextBox5.Text) per3 = Val(TextBox6.Text) per4 = Val(TextBox8.Text) TextBox3.Text = (BAS * ALT) TextBox7.Text = per1 + per2 + per3 + per4
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox4.Clear() TextBox5.Clear() TextBox6.Clear() TextBox7.Clear() TextBox8.Clear() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub End Class
AREA PERIMETRO DEL ROMBO
Public Class Form1 Dim BAS As Double Dim ALT As Double Dim per1 As Double Dim per2 As Double Dim per3 As Double Dim per4 As Double Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click BAS = Val(TextBox1.Text) ALT = Val(TextBox2.Text) per1 = Val(TextBox4.Text) per2 = Val(TextBox5.Text) per3 = Val(TextBox6.Text) per4 = Val(TextBox8.Text) TextBox3.Text = (BAS * ALT) TextBox7.Text = per1 + per2 + per3 + per4
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox4.Clear() TextBox5.Clear() TextBox6.Clear() TextBox7.Clear() TextBox8.Clear() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub End Class
AREA PERIMETRO Y RADIO
Public Class Form1 Dim BAS As Double Dim ALT As Double Dim per1 As Double Dim per2 As Double Dim per3 As Double Dim per4 As Double Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click BAS = Val(TextBox1.Text) ALT = 3.14159 * 2 TextBox3.Text = (BAS) * (ALT) TextBox7.Text = 2 * ALT * BAS
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click TextBox1.Clear() TextBox3.Clear() TextBox7.Clear()
End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub End Class
NOTAS ACADEMICAS
P
ublic Class Form1 Dim n1 As Double Dim n2 As Double Dim n3 As Double Dim n4 As Double Dim resul As Double Dim pro As Double Dim div As Double
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged n1 = Val(TextBox1.Text) If n1 > 10 Then MsgBox(“error nota mayor a 10”) End If End Sub Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged n2 = Val(TextBox2.Text) If n2 > 10 Then MsgBox(“error nota mayor a 10”) End If End Sub
Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged n3 = Val(TextBox3.Text) If n3 > 10 Then MsgBox(“error nota mayor a 10”) End If End Sub Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged n4 = Val(TextBox4.Text) If n4 > 10 Then MsgBox(“error nota mayor a 10”) End If End Sub Private Sub BT5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT5.Click TextBox5.Text = TextBox5.Text TextBox5.Text = (n1 + n2 + n3 + n4) End Sub
Private Sub BT6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT6.Click div = 4 TextBox6.Text = (n1 + n2 + n3 + n4) / div resul = (n1 + n2 + n3 + n4) / div End Sub Private Sub BT7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT7.Click If resul = 10 Then TextBox7.Text = “ supera los aprendizajes requeridos” Else If resul >= 8 Then TextBox7.Text = “domina los aprendizajes requeridos “ Else If resul = 7 Then TextBox7.Text = “alcansa los aprendizajes requeridos “ Else If resul >= 5 Then TextBox7.Text = “proximo los aprendizajes requeridos “ Else If resul <= 4 Then TextBox7.Text = “no alcansa los aprendizajes requeridos “ End If End If
End If End If End If End Sub Private Sub TextBox5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox5.TextChanged End Sub Private Sub BT2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub BT3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub BT4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub
Private Sub TextBox6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox6.TextChanged End Sub Private Sub TextBox7_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox7.TextChanged End Sub Private Sub BT1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub End Class
PAR Y IMPAR
Public Class Form1 Dim num As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click num = Val(TextBox1.Text) If num Mod 2 = 0 Then TextBox2.Text = “ par” End If If num Mod 2 = 1 Then TextBox2.Text = “ impar” End If End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = “” TextBox2.Text = “” End Sub End Class
POSITIVO Y NEGATIVO
Public Class Form1 Dim numero As Double Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click numero = TextBox1.Text If numero > 0 Then MsgBox(“el numero es positivo”) Else MsgBox(“el numero es negativo”) End If
LAS TABLAS DE MULTIPLICAR
P
ublic Class Form1 Dim calcular As Double
Private Sub TextBox10_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox10.TextChanged End Sub Private Sub TextBox11_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox11.TextChanged End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click calcular = Val(TextBox1.Text) TextBox2.Text = calcular * 1 TextBox3.Text = calcular * 2 TextBox4.Text = calcular * 3 TextBox5.Text = calcular * 4 TextBox6.Text = calcular * 5 TextBox7.Text = calcular * 6 TextBox8.Text = calcular * 7 TextBox9.Text = calcular * 8 TextBox10.Text = calcular * 9 TextBox11.Text = calcular * 10 TextBox12.Text = calcular * 11 TextBox13.Text = calcular * 12
TextBox13.Text = calcular * 12 TextBox14.Text = calcular TextBox15.Text = calcular TextBox16.Text = calcular TextBox17.Text = calcular TextBox18.Text = calcular TextBox19.Text = calcular TextBox20.Text = calcular TextBox21.Text = calcular TextBox22.Text = calcular TextBox23.Text = calcular TextBox24.Text = calcular TextBox25.Text = calcular
End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = “” TextBox2.Text = “” TextBox3.Text = “” TextBox4.Text = “” TextBox5.Text = “” TextBox6.Text = “” TextBox7.Text = “” TextBox8.Text = “” TextBox9.Text = “” TextBox10.Text = “” TextBox11.Text = “” TextBox12.Text = “”
TextBox13.Text = “” TextBox14.Text = “” TextBox15.Text = “” TextBox16.Text = “” TextBox17.Text = “” TextBox18.Text = “” TextBox19.Text = “” TextBox20.Text = “” TextBox21.Text = “” TextBox22.Text = “” TextBox23.Text = “” TextBox24.Text = “” TextBox25.Text = “” End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End End Sub End Class
factura
P
ublic Class Form1 Dim Cant As Double Dim Cant1 As Double Dim Cant2 As Double Dim Cant3 As Double Dim Cant4 As Double Dim ValorUni As Double Dim ValorUni1 As Double Dim ValorUni2 As Double Dim ValorUni3 As Double Dim ValorUni4 As Double Dim Valortotal As Double Dim Valortotal1 As Double Dim Valortotal2 As Double Dim Valortotal3 As Double Dim Valortotal4 As Double Dim total As Double Dim desc2 As Double Dim iva3 As Double
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Cant = Val(TextBox1.Text) Cant1 = Val(TextBox2.Text) Cant2 = Val(TextBox3.Text) Cant3 = Val(TextBox4.Text) Cant4 = Val(TextBox5.Text) ValorUni = Val(TextBox11.Text) ValorUni1 = Val(TextBox12.Text) ValorUni2 = Val(TextBox13.Text) ValorUni3 = Val(TextBox14.Text) ValorUni4 = Val(TextBox15.Text) TextBox16.Text = Cant * ValorUni TextBox17.Text = Cant1 * ValorUni1 TextBox18.Text = Cant2 * ValorUni2 TextBox19.Text = Cant3 * ValorUni3 TextBox20.Text = Cant4 * ValorUni4 Valortotal = Val(TextBox16.Text) Valortotal1 = Val(TextBox17.Text) Valortotal2 = Val(TextBox18.Text) Valortotal3 = Val(TextBox19.Text) Valortotal4 = Val(TextBox20.Text) TextBox21.Text = Valortotal + Valortotal1 + Valortotal3 + Valortotal4 If (TextBox21.Text > 10000) Then TextBox22.Text = (TextBox21.Text * 100) / 25 MsgBox(“DESCUENTO DE 25%”) Else
If (TextBox21.Text > 5000 & TextBox21.Text < 10000) Then TextBox22.Text = (TextBox21.Text * 100) / 20 MsgBox(“DESCUENTO DE 20%”) Else If (TextBox21.Text >= 2500 & TextBox21.Text < 5000) Then TextBox22.Text = (TextBox21.Text * 100) / 15 MsgBox(“DESCUENTO DE 15%”) Else If (TextBox21.Text >= 1200 & TextBox21.Text < 2500) Then TextBox22.Text = (TextBox21.Text * 100) / 10 MsgBox(“DESCUENTO DE 10%”) Else If (TextBox21.Text >= 350 & TextBox21.Text < 1200) Then TextBox22.Text = (TextBox21.Text * 100) / 5 MsgBox(“DESCUENTO DE 5%”) Else If (TextBox21.Text < 350) Then TextBox22.Text = 0.0 MsgBox(“NO EXISTE DESCUENTO”) End If End If End If End If End If End If
TextBox23.Text = TextBox21.Text - TextBox22.Text total = TextBox21.Text * 0.1 desc2 = Val(TextBox22.Text) iva3 = Val(TextBox24.Text) TextBox24.Text = TextBox21.Text - total TextBox25.Text = (TextBox21.Text - desc2) + iva3
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = “” TextBox2.Text = “” TextBox3.Text = “” TextBox4.Text = “” TextBox5.Text = “” TextBox6.Text = “” TextBox7.Text = “” TextBox8.Text = “” TextBox9.Text = “” TextBox10.Text = “” TextBox11.Text = “” TextBox12.Text = “” TextBox13.Text = “” TextBox14.Text = “” TextBox15.Text = “” TextBox16.Text = “” TextBox17.Text = “”
TextBox18.Text = “” TextBox19.Text = “” TextBox20.Text = “” TextBox21.Text = “” TextBox22.Text = “” TextBox23.Text = “” TextBox24.Text = “” TextBox25.Text = “” End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End End Sub End Class