jueves, 29 de agosto de 2013

MiniCalculdora Visual Basic - Algoritmos y Programacion

MiniCalculdora  http://youtu.be/4DOXnEw5bYg

Borra todo y copialo los codigos en tu Formulario


Public Class Form1

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

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
     
        If Val(TextBox2.Text) = False Or Val(TextBox3.Text) = False Then
            MsgBox("Ingrese Valores Faltantes")
            Label1.Text = " "
            TextBox1.Text = " "
            TextBox3.Text = " "
            TextBox2.Text = " "
        Else

            Label1.Text = Button1.Text
            TextBox1.Text = Val(TextBox3.Text) + Val(TextBox2.Text)

        End If


    End Sub


    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click


    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        TextBox1.Text = " "
        TextBox3.Text = " "
        TextBox2.Text = " "
        Label1.Text = " "
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If Val(TextBox2.Text) = False Or Val(TextBox3.Text) = False Then
            MsgBox("Ingrese Valores Faltantes")
            Label1.Text = " "
            TextBox1.Text = " "
            TextBox3.Text = " "
            TextBox2.Text = " "
        Else

            Label1.Text = Button2.Text
            TextBox1.Text = Val(TextBox3.Text) - Val(TextBox2.Text)

        End If

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        If Val(TextBox2.Text) = False Or Val(TextBox3.Text) = False Then
            MsgBox("Ingrese Valores Faltantes")
            Label1.Text = " "
            TextBox1.Text = " "
            TextBox3.Text = " "
            TextBox2.Text = " "
        Else

            Label1.Text = Button3.Text
            TextBox1.Text = Val(TextBox3.Text) * Val(TextBox2.Text)

        End If

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        If Val(TextBox2.Text) = False Or Val(TextBox3.Text) = False Then
            MsgBox("Ingrese Valores Faltantes")
            Label1.Text = " "
            TextBox1.Text = " "
            TextBox3.Text = " "
            TextBox2.Text = " "
        Else

            Label1.Text = Button4.Text
            TextBox1.Text = Val(TextBox3.Text) / Val(TextBox2.Text)

        End If

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class

No hay comentarios.:

Publicar un comentario