triangulos.docx
Post on 08-Jul-2016
214 Views
Preview:
TRANSCRIPT
SALUDOS
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MsgBox("saludos")MessageBox.Show("BIENVENIDOS A VB.NET", "TITULO") End SubEnd Class
Hacer un programa que nos permita, ingresar dos números luego imprimir su producto
Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a, b As Integer a = InputBox("ingrese a", "entrada", 8) b = InputBox("ingrese b", "entrada", 9) MessageBox.Show(a * b, "salida")
End SubEnd Class
Calcular el Área de un triangulo
Imports System.MathPublic Class Form3
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a, b, c, p, area As Integer a = Val(Me.TextBox1.Text) b = Val(Me.TextBox2.Text) c = Val(Me.TextBox3.Text) p = (a + b + c) / 2 If (p > a And p > b And p > c) Then area = Sqrt(p * (p - a) * (p - b) * (p - c)) Me.TextBox4.Text = area Else Me.TextBox4.Text = "error" End If
End Sub
Area de un rombo
Imports System.MathPublic Class Form5
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a, b, area As Integer a = Val(Me.TextBox1.Text) b = Val(Me.TextBox2.Text)
area = (a * b) / 2 Me.TextBox3.Text = area End SubEnd Class
Ley de senos para hallar sua angulos
Imports System.MathPublic Class Form4
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim a, b, c, aa, ab, ac As Decimal a = CDbl(TextBox1.Text) aa = CDbl(TextBox2.Text) ab = CDbl(TextBox3.Text) ac = (180 - aa - ab) b = (a * Sin(ab * PI / 180)) / Sin(aa * PI / 180) c = (a * Sin(ac * PI / 180)) / Sin(aa * PI / 180) TextBox4.Text = b TextBox5.Text = c End SubEnd Class
Menu de opciome y modulosPublic Class Form8 Dim x As Integer
Private Sub Fornumario1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Fornumario1ToolStripMenuItem.Click uno() End Sub
Private Sub EjercicioToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EjercicioToolStripMenuItem.Click luyta() End Sub
Private Sub SalirToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SalirToolStripMenuItem.Click
End End Sub
Private Sub Ejercicio3ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Ejercicio3ToolStripMenuItem.Click Dim a As New Form5 a.Show() End Sub
Private Sub CalculadoraToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CalculadoraToolStripMenuItem.Click Shell("C:\WINDOWS.0\system32\calc.exe", AppWinStyle.MaximizedFocus) End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click uno() End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click luyta() End Sub
Private Sub Form8_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load x = 100 Me.ToolStripLabel1.Text = Now.Date.ToShortDateString Me.ToolStripLabel2.Text = Now.ToString
End Sub
Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim esp As String esp = Space(x) If (x = 1) Then x = 100 Else Me.Text = esp & "sistema de matricula" x = x - 1
End If Me.ToolStripLabel2.Text = Now.ToLongTimeString
End SubEnd Class
Llamara a la calculadora
top related