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

Calculadora: Form Eventargs

This document describes a calculator application with the following functionality: - Displays the current date and time in a label that is updated every second - Buttons to perform addition, subtraction, multiplication, division, exponentiation, square root, and modulo operations on values in two text boxes and display the result in a third text box - A button to clear all text boxes - A button to close the application with a message

Uploaded by

HoMaBe
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)
26 views2 pages

Calculadora: Form Eventargs

This document describes a calculator application with the following functionality: - Displays the current date and time in a label that is updated every second - Buttons to perform addition, subtraction, multiplication, division, exponentiation, square root, and modulo operations on values in two text boxes and display the result in a third text box - A button to clear all text boxes - A button to close the application with a message

Uploaded by

HoMaBe
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

CALCULADORA

Public Class Form Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick Label1.Text = UCase(Format(Now(), ("dddd dd 'de' MMMM 'del' yyyy") & Chr(10) & Chr(10) & Format(Now(), ("hh:mm:ss")))) End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click MessageBox.Show("Adios") End End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text) End Sub Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click TextBox3.Text = Val(TextBox1.Text) - Val(TextBox2.Text) End Sub Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click TextBox3.Text = (TextBox1.Text) * (TextBox2.Text) End Sub Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click TextBox3.Text = Val(TextBox1.Text) / Val(TextBox2.Text) End Sub Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click TextBox3.Text = TextBox1.Text ^ TextBox2.Text End Sub

Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click TextBox3.Text = System.Math.Sqrt(TextBox1.Text) End Sub Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click TextBox1.Text = " " TextBox2.Text = " " TextBox3.Text = " " End Sub Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click TextBox3.Text = TextBox1.Text Mod TextBox2.Text 'modulo o residuo End Sub End Class

You might also like