Posted by : HD Technology Studio Selasa, 19 April 2016




Langkah 1 : Desain Form
Pertama – tama buatlah project baru dengan cara klik File ( New Project ( windows form application.
Buatlah desain form seperti gambar diatas. Adapun tools yang dibutuhkan dan konfigurasinya yaitu :




Langkah 2 : Listing Code

Public Class Form1
    Public angka As Double
    Public sisi As Double
    Public luas As Double
    Public keliling As Double
    Public operation As Byte
    Private Sub btncount_Click(sender As Object, e As EventArgs) Handles btncount.Click
        If operation = "1" Then
            keliling = 4 * txtsisi.Text
            rthasil.Text = keliling
        ElseIf operation = "2" Then
            luas = txtsisi.Text ^ 2
            rthasil.Text = luas
        ElseIf operation = "3" Then
            sisi = Math.Sqrt((txtluas.Text))
            rthasil.Text = sisi
        ElseIf operation = "4" Then
            angka = txtkeliling.Text / 4
            rthasil.Text = angka
        End If
    End Sub

    Private Sub optkel_Click(sender As Object, e As EventArgs) Handles optkel.Click
        operation = 1
        angka = Double.Parse(txtsisi.Text)
    End Sub

    Private Sub optluas_Click(sender As Object, e As EventArgs) Handles optluas.Click
        operation = 2
        angka = Double.Parse(txtsisi.Text)
    End Sub

    Private Sub optsisi2_Click(sender As Object, e As EventArgs) Handles optsisi2.Click
        operation = 4S
    End Sub

    Private Sub optsisi_Click(sender As Object, e As EventArgs) Handles optsisi.Click
        operation = 3
    End Sub

    Private Sub btnexit_Click(sender As Object, e As EventArgs) Handles btnexit.Click
        Me.Close()
    End Sub

    Private Sub btnclear_Click(sender As Object, e As EventArgs) Handles btnclear.Click
        txtkeliling.Text = ""
        txtluas.Text = ""
        txtsisi.Text = ""
        rthasil.Text = ""
    End Sub
End Class

Langkah 3 : Debugging
Klik Debug ( Start Debugging
Jika tidak terjadi error maka software buatan anda berhasil. Jika terjadi bug atau error silahkan periksa kembali.

Silahkan download source codenya di sini
Atau download hasil software nya disini



















Leave a Reply

Subscribe to Posts | Subscribe to Comments

Welcome to My Blog

Translate

Popular Post

Flag Counter

- Copyright © HD Technology Studio -Robotic Notes- Powered by Blogger - Designed by Johanes Djogan -