100% found this document useful (1 vote)
227 views

Visual Net: Form1 Object Eventargs

This document contains code for several small programs that perform basic math operations and conversions. The programs include: dividing two numbers entered in text boxes and displaying the quotient and remainder, calculating the area and volume of a room given its dimensions, converting seconds entered into a text box to minutes and remaining seconds, and converting feet entered into a text box to yards, inches, centimeters and meters.

Uploaded by

ThaliaL.R.Klaus
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
227 views

Visual Net: Form1 Object Eventargs

This document contains code for several small programs that perform basic math operations and conversions. The programs include: dividing two numbers entered in text boxes and displaying the quotient and remainder, calculating the area and volume of a room given its dimensions, converting seconds entered into a text box to minutes and remaining seconds, and converting feet entered into a text box to yards, inches, centimeters and meters.

Uploaded by

ThaliaL.R.Klaus
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

VISUAL NET

Public Class Form1


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim a As Integer
Dim b As Integer
Dim cociente As Integer
Dim resto As Integer
a = Val(TextBox1.Text)
b = Val(TextBox2.Text)
cociente = a / b
resto = a Mod b
Label4.Text = cociente
Label5.Text = resto
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Label1.Click
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
End
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
TextBox1.Text = ""
TextBox2.Text = ""
Label4.Text = ""
Label5.Text = ""
TextBox1.Focus()
End Sub
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Label2.Click
End Sub
End Class

-x-

Longitud, ancho y altura de una habitacin y a continuaciobn muestre el volumen de la


habitacin mediante un mensaje.

Public Class Form1


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim lon As Integer
Dim ach As Integer
Dim alt As Integer
Dim area As Integer

Dim vol As Integer


lon = Val(TextBox1.Text)
ach = Val(TextBox2.Text)
alt = Val(TextBox3.Text)
area = lon * ach
vol = area * alt

MsgBox("El area es: " & area & Chr(13) & "El volumen es " & vol)
End Sub
End Class

-x-

INGRESAR UN VALOR EN SEGUNDOS Y NOS MUESTRE EN MINUTOS Y SU DIFERENCIA EN


SEGUNDOS

Public Class Form1


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim seg1 As Integer
Dim MinEnt As Integer
Dim seg2 As Integer
seg1 = Val(TextBox1.Text)
MinEnt = seg1 / 60

seg2 = seg1 Mod 60


MsgBox(MinEnt & "min " & seg2 & "segundos")
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Label1.Click
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox1.Focus()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
End
End Sub
End Class

-x-

ESCRIBIR UN PROGRAMA PARA CONVERTIR UNA MEDIDA EN PIE DADA EN PIES SUS
EQUIVALENCIAS
YARDAS PULGADAS CENTIMETROS METROS
UN PIE = 12 PULGADAS
1 YARDA = 3 PIES
1 PULGADA = 2.45 CM
1METRO = 100 CM
LEER EL NUMERO DE PIES ENSEGUIDA DE MOSTRAR EL NUMERO DE YARDAS, PIES, PULGADAS,
CENTIMETROS Y METROS

Public Class Form1


Dim
Dim
Dim
Dim
Dim

pie As Integer
yard As Double
pulg As Integer
cent As Integer
met As Integer

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
pie = Val(TextBox1.Text)
yard = pie / 3
MsgBox(pie & "pies " & yard & "yardas")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
pie = Val(TextBox1.Text)
cent = pie / 3.48
MsgBox(pie & "pies " & yard & "centimetros")

End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button4.Click
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button5.Click
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button6.Click
End Sub
End Class

Supongamos que un automvil parte del reposo y tiene una aceleracin

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy