0% found this document useful (0 votes)
48 views2 pages

Form1 Eventargs: "Oye, ¡No Existen Matrículas Negativas!, Reacciona:V"

The document contains code for a form with radio buttons and text boxes. It takes a number from a text box, checks if it is negative, and sets maximum values based on which radio buttons are selected. If no radio buttons are selected, it displays a message. It can reset the radio button selections, hide the current form and show another, or end the program.

Uploaded by

Santiago Giraldo
Copyright
© © All Rights Reserved
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)
48 views2 pages

Form1 Eventargs: "Oye, ¡No Existen Matrículas Negativas!, Reacciona:V"

The document contains code for a form with radio buttons and text boxes. It takes a number from a text box, checks if it is negative, and sets maximum values based on which radio buttons are selected. If no radio buttons are selected, it displays a message. It can reset the radio button selections, hide the current form and show another, or end the program.

Uploaded by

Santiago Giraldo
Copyright
© © All Rights Reserved
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/ 2

Public Class Form1

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click


Dim C As Integer
C = Val(TextBox1.Text)
While C < 0
MessageBox.Show("Oye, no existen matrculas negativas!, REACCIONA :v")
Exit Sub
End While
If RadioButton1.Checked Then
If C <= 4800000 Then
C=C
Else
C = 4800000
End If
End If
If RadioButton2.Checked Then
If C <= 3500000 Then
C=C
Else
C = 3500000
End If
End If
If RadioButton3.Checked Then
If C <= 3000000 Then
C=C
Else
C = 3000000
End If
End If
If RadioButton4.Checked Then C = C + 1000000
If RadioButton5.Checked Then C = C + 1000000
If RadioButton6.Checked Then C = C + 1000000
If RadioButton7.Checked Then C = C + 500000
If RadioButton8.Checked Then C = C + 500000
If RadioButton9.Checked Then C = C + 500000
If RadioButton1.Checked = Nothing And RadioButton2.Checked = Nothing And
RadioButton3.Checked = Nothing And RadioButton4.Checked = Nothing And
RadioButton5.Checked = Nothing And RadioButton6.Checked = Nothing And
RadioButton7.Checked = Nothing And RadioButton8.Checked = Nothing And
RadioButton9.Checked = Nothing Then
MessageBox.Show("Por favor...selecciona algo...")
Exit Sub
End If
If RadioButton1.Checked Or RadioButton2.Checked Or RadioButton3.Checked Then
If RadioButton4.Checked = Nothing And RadioButton5.Checked = Nothing And
RadioButton6.Checked = Nothing And RadioButton7.Checked = Nothing And
RadioButton8.Checked = Nothing And RadioButton9.Checked = Nothing Then
MessageBox.Show("Enserio, selecciona...ALGO (COMPLETO!) >:'v")
Exit Sub
End If
End If
If RadioButton4.Checked Or RadioButton5.Checked Or RadioButton6.Checked Or
RadioButton7.Checked Or RadioButton8.Checked Or RadioButton9.Checked Then
If RadioButton1.Checked = Nothing And RadioButton2.Checked = Nothing And
RadioButton3.Checked = Nothing Then
MessageBox.Show("Enserio, selecciona...ALGO (COMPLETO!) >:'v")
Exit Sub

End If
End If
Label8.Text = C
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
RadioButton1.Checked = Nothing
RadioButton2.Checked = Nothing
RadioButton3.Checked = Nothing
RadioButton4.Checked = Nothing
RadioButton5.Checked = Nothing
RadioButton6.Checked = Nothing
RadioButton7.Checked = Nothing
RadioButton8.Checked = Nothing
RadioButton9.Checked = Nothing
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.Hide()
Form2.Show()
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
End
End Sub
End Class

You might also like