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

Ejercicio - Clase1 - SOLUCIONES

The document contains code for two separate classes - Form1 and Form2. Form1 contains code to change the foreground color of Label1 to red, blue, green, or yellow depending on which radio button is clicked. Form2 contains code to calculate the product of two textbox values, display it in Label4, and calculate 15% of the product to display in Label6 when a button is clicked.

Uploaded by

wlz1964
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 PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Ejercicio - Clase1 - SOLUCIONES

The document contains code for two separate classes - Form1 and Form2. Form1 contains code to change the foreground color of Label1 to red, blue, green, or yellow depending on which radio button is clicked. Form2 contains code to calculate the product of two textbox values, display it in Label4, and calculate 15% of the product to display in Label6 when a button is clicked.

Uploaded by

wlz1964
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 PDF, TXT or read online on Scribd
You are on page 1/ 2

Ejercicio 1:

Public Class Form1


Private Sub RadioButton1_Click(sender As Object, e As EventArgs) Handles RadioButton1.Click Label1.ForeColor = Color.Red End Sub

Private Sub RadioButton2_Click(sender As Object, e As EventArgs) Handles RadioButton2.Click Label1.ForeColor = Color.Blue End Sub

Private Sub RadioButton3_Click(sender As Object, e As EventArgs) Handles RadioButton3.Click Label1.ForeColor = Color.Green End Sub Private Sub RadioButton4_Click(sender As Object, e As EventArgs) Handles RadioButton4.Click Label1.ForeColor = Color.Yellow End Sub Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub

End Class

EJERCICIO 4:

Public Class Form2


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Label4.Text = Val(TextBox1.Text) * Val(TextBox2.Text) Label6.Text = (Val(TextBox1.Text) * Val(TextBox2.Text)) * 0.15 End Sub

End Class

You might also like