This document contains the code for a Windows form application with radio buttons, text boxes, and buttons. When a radio button is selected, it sets the text of text box 3 to a number and calculates the product of the values in text boxes 1 and 3, displaying the result in text box 2. Text box 1 triggers a recalculation when its text changes. Buttons allow resetting the form or closing it.
Original Description:
Progamacion en visual basic studio usando radiobox
This document contains the code for a Windows form application with radio buttons, text boxes, and buttons. When a radio button is selected, it sets the text of text box 3 to a number and calculates the product of the values in text boxes 1 and 3, displaying the result in text box 2. Text box 1 triggers a recalculation when its text changes. Buttons allow resetting the form or closing it.
This document contains the code for a Windows form application with radio buttons, text boxes, and buttons. When a radio button is selected, it sets the text of text box 3 to a number and calculates the product of the values in text boxes 1 and 3, displaying the result in text box 2. Text box 1 triggers a recalculation when its text changes. Buttons allow resetting the form or closing it.
Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs)
Handles RadioButton1.CheckedChanged TextBox3.Text = "20" TextBox2.Text = Val(TextBox1.Text) * Val(TextBox3.Text) TextBox1.Focus() End Sub Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.CheckedChanged TextBox3.Text = "15" TextBox2.Text = Val(TextBox1.Text) * Val(TextBox3.Text) TextBox1.Focus() End Sub Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton3.CheckedChanged TextBox3.Text = "10" TextBox2.Text = Val(TextBox1.Text) * Val(TextBox3.Text) TextBox1.Focus() End Sub Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged TextBox2.Text = Val(TextBox1.Text) * Val(TextBox3.Text) End Sub Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click Me.Close() End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click TextBox1.Text = "" TextBox2.Text = "0" TextBox1.Focus() End Sub Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load TextBox1.Focus() End Sub End Class