0% found this document useful (0 votes)
84 views1 page

Exercise 4

This Visual Basic code defines a class with a button click event handler that takes input from a text box, performs calculations on it, and displays the result in a label. The button click event handler assigns the text box value to a variable, calculates 0.75 + 1.0 + 0.05 multiplied by the variable squared, and sets the label text to the result.

Uploaded by

api-310300017
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)
84 views1 page

Exercise 4

This Visual Basic code defines a class with a button click event handler that takes input from a text box, performs calculations on it, and displays the result in a label. The button click event handler assigns the text box value to a variable, calculates 0.75 + 1.0 + 0.05 multiplied by the variable squared, and sets the label text to the result.

Uploaded by

api-310300017
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/ 1

Public Class Form1

Dim Num1 As Single


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Num1 = TextBox1.Text
Label3.Text = 0.75 + 1.0 + 0.05 * Num1 * Num1
End Sub
End Class

You might also like