formulario de visual basic.net

Ejemplo Propuesto de Formulario de Visual Basic.NET 2010


Private Sub btncalcular_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncalcular.Click

        REM var
        Dim ht, he As Integer
        Dim ch, ss, vhe, sn As Double
        REM leer
        ht = txtht.Text
        ch = txtch.Text
        ss = ht * ch
        REM proceso
        If ht > 40 Then
            he = ht - 40
            vhe = he * (ch + (ch * 0.5))          
        End If
        sn = ss + vhe
        REM escribir
        txtss.Text = "S/." & ss.ToString("###,##0.00")
        txthe.Text = he
        txtvhe.Text = "S/." & vhe.ToString("###,##0.00")
        txtsn.Text = "S/." & sn.ToString("###,##0.00")
    End Sub

Comentarios

Entradas populares

Ejercicios Consola Visual Basic.NET

Numero Capicua Visual Basic

Procedimientos Almacenados ORACLE