0% found this document useful (0 votes)
37 views5 pages

Public Class Private Sub Byval As Byval As Handles Mybase: "Azul" "Rojo" "Amarillo" "Turquesa" "Plomo" "Verde"

The document contains code for a Windows form application that allows users to: 1) Add and remove items from combo boxes and clear text boxes with button clicks. 2) Perform basic math operations like addition, subtraction, multiplication and division on values in text boxes and display the result. 3) Calculate the average of values in text boxes, and display if the average is above or below a passing threshold.

Uploaded by

Etb Etb
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views5 pages

Public Class Private Sub Byval As Byval As Handles Mybase: "Azul" "Rojo" "Amarillo" "Turquesa" "Plomo" "Verde"

The document contains code for a Windows form application that allows users to: 1) Add and remove items from combo boxes and clear text boxes with button clicks. 2) Perform basic math operations like addition, subtraction, multiplication and division on values in text boxes and display the result. 3) Calculate the average of values in text boxes, and display if the average is above or below a passing threshold.

Uploaded by

Etb Etb
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ComboBox1.Items.Add("AZUL") ComboBox1.Items.Add("ROJO") ComboBox1.Items.

Add("AMARILLO") ComboBox1.Items.Add("TURQUESA") ComboBox1.Items.Add("PLOMO") ComboBox1.Items.Add("VERDE") ComboBox2.Items.Add("NARANJA") ComboBox2.Items.Add("CELESTE") ComboBox2.Items.Add("ROSA") ComboBox2.Items.Add("NEGRO") ComboBox2.Items.Add("BLANCO") ComboBox2.Items.Add("CAFE")

End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ComboBox1.Items.Add(TextBox1.Text) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ComboBox1.Items.Clear() TextBox1.Clear() End Sub End Class

Public Class Form1 Private Sub Button19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button19.Click TextBox1.Text = Val(TextBox2.Text) + Val(TextBox3.Text) End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click TextBox1.Text = Val(TextBox2.Text) - Val(TextBox3.Text) End Sub Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click TextBox1.Text = Val(TextBox2.Text) * Val(TextBox3.Text) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = Val(TextBox2.Text) / Val(TextBox3.Text) End Sub Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click End Sub End Class

Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) txt_total.Text = Val(txt_pri.Text) + Val(txt_segundo.Text) End Sub Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) txt_total.Text = Val(txt_pri.Text) - Val(txt_segundo.Text) End Sub Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) txt_total.Text = Val(txt_pri.Text) * Val(txt_segundo.Text) End Sub Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) txt_total.Text = Val(txt_pri.Text) / Val(txt_segundo.Text) End Sub Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) txt_pri.Clear() txt_segundo.Clear() txt_total.Clear() End Sub

Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim x As Integer x = txt_total.Text End Sub Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged txt_total.Text = Val(txt_pri.Text) + Val(txt_segundo.Text) End Sub Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged txt_total.Text = Val(txt_pri.Text) - Val(txt_segundo.Text) End Sub Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged txt_total.Text = Val(txt_pri.Text) * Val(txt_segundo.Text) End Sub Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged txt_total.Text = Val(txt_pri.Text) / Val(txt_segundo.Text) End Sub Private Sub RadioButton5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton5.CheckedChanged txt_pri.Clear() txt_segundo.Clear() txt_total.Clear() End Sub End Class

Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ComboBox1.Items.Add("Matematicas") ComboBox1.Items.Add("RS") ComboBox1.Items.Add("Ingles") ComboBox1.Items.Add("Analisis") ComboBox1.Items.Add("Base de Datos") ComboBox1.Items.Add("Circuitos") End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox6.Text = (Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox4.Text)) / 3 If TextBox6.Text >= 70 Then TextBox5.Text = "aprobado" Else TextBox5.Text = "reprobado" End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox2.Clear() TextBox3.Clear() TextBox4.Clear() TextBox6.Clear() End Sub Private Sub TextBox5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox5.TextChanged If TextBox6.Text >= 14 Then TextBox5.Text = "aprobado" Else TextBox5.Text = "reprobado" End If End Sub End Class

You might also like