my code stock.com

Snippet options

Download: Download snippet as calculadora-paypal.vbs.
Copy snippet: For this you need a free my code stock.com account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!

Public Class Form1

    Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged

    End Sub

    Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
        If ComboBox1.Text = ("Peso Chileno") Then
            TextBox1.Text = WebBrowser1.Document.GetElementById("to_CLP").InnerHtml
        End If
        If ComboBox1.Text = ("Peso Argentino") Then
            TextBox1.Text = WebBrowser1.Document.GetElementById("to_ARS").InnerHtml
        End If
        If ComboBox1.Text = ("Sol Peruano") Then
            TextBox1.Text = WebBrowser1.Document.GetElementById("to_PEN").InnerHtml
        End If
        If ComboBox1.Text = ("Peso Mexicano") Then
            TextBox1.Text = WebBrowser1.Document.GetElementById("to_MXN").InnerHtml
        End If
        If ComboBox1.Text = ("Peso Colombiano") Then
            TextBox1.Text = WebBrowser1.Document.GetElementById("to_COP").InnerHtml
        End If
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        TextBox3.Text = TextBox1.Text * TextBox2.Text
    End Sub

    Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click

    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
        If ComboBox1.Text = "" Then
            Button1.Enabled = False
            Button2.Enabled = False
        End If
        If ComboBox1.Text = ("Peso Chileno") Then
            WebBrowser1.Navigate("http://www.valor-dolar.cl/")
            PictureBox1.Image = My.Resources.Chile
            Button1.Enabled = True
            Button2.Enabled = True
            MsgBox("Ha seleccionado el Peso Chileno")
        End If
        If ComboBox1.Text = ("Peso Argentino") Then
            WebBrowser1.Navigate("http://www.valor-dolar.cl/dolar_peso_argentina")
            PictureBox1.Image = My.Resources.Argentina
            Button1.Enabled = True
            Button2.Enabled = True
            MsgBox("Ha selecciona el Peso Argentino")
        End If
        If ComboBox1.Text = ("Sol Peruano") Then
            WebBrowser1.Navigate("http://www.precio-dolar.pe/")
            PictureBox1.Image = My.Resources.Peru
            Button1.Enabled = True
            Button2.Enabled = True
            MsgBox("Ha seleccionado el Sol Peruano")
        End If
        If ComboBox1.Text = ("Peso Mexicano") Then
            WebBrowser1.Navigate("http://www.cambiodolar.mx/")
            PictureBox1.Image = My.Resources.Mexico
            Button1.Enabled = True
            Button2.Enabled = True
            MsgBox("Ha seleccionado el Peso Mexicano")
        End If
        If ComboBox1.Text = ("Peso Colombiano") Then
            WebBrowser1.Navigate("http://preciodolar.co/")
            PictureBox1.Image = My.Resources.Colombia
            Button1.Enabled = True
            Button2.Enabled = True
            MsgBox("Ha seleccionado el Peso Colombiano")
        End If
    End Sub

    Private Sub Label7_Click(sender As Object, e As EventArgs) Handles Label7.Click

    End Sub

    Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.Checked = True Then
            PictureBox2.Image = My.Resources.Paypal
            Button1.Hide()
            Button2.Show()
            TextBox4.Show()
            TextBox5.Show()
            TextBox6.Show()
            Label8.Show()
            Label9.Show()
            Label11.Show()
        End If
        If CheckBox1.Checked = False Then
            PictureBox2.Image = My.Resources.Image1
            Button1.Show()
            Button2.Hide()
            TextBox4.Hide()
            TextBox5.Hide()
            TextBox6.Hide()
            Label8.Hide()
            Label9.Hide()
            Label11.Hide()
        End If
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        TextBox3.Text = TextBox1.Text * TextBox2.Text
        TextBox6.Text = (TextBox3.Text * 0.054) + TextBox3.Text + (TextBox1.Text * 0.3)
    End Sub

    Private Sub Label10_Click(sender As Object, e As EventArgs)

    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        If ComboBox1.Text = "" Then
            Button1.Enabled = False
            Button2.Enabled = False
        End If
    End Sub
End Class

Create a free my code stock.com account now.

my code stok.com is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.