Aplikasi Konversi Desimal – Octal

screenshot

Berikut ini adalah penjelasan coding dari program decimal – octal converter buatan saya dengan menggunakan Visual Basic 2008 Express Edition

No

Komponen

Properties

Nilai

1

Form

Name

Form1

Text

Aplikasi Konversi Desimal Biner

2

Label

Text

Konversi Desimal dan Biner

Text

Nilai

3

Textbox1

Name

Nilai

Text

0

4

Textbox2

Name

Hasil

Text

0

5

RadioButton1

Name

Rbdec2oct

Text

Desimal -> Octal

6

RadioButton2

Name

Rboct2dec

Text

Octal -> Desimal

7

Button1

Name

Btnkonversi

Text

&Konversi

8

Button2

Name

Btnreset

Text

&Reset

9

Button3

Name

Btnexit

Text

&Exit

Public Class Form1

Dim response As MsgBoxResult

Private Sub btnkonversi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkonversi.Click

If rbdec2oct.Checked Then

hasil.Text = Oct(nilai.Text)

ElseIf rboct2dec.Checked Then

hasil.Text = 0

For g As Integer = Len(nilai.Text) To 1 Step -1

hasil.Text = hasil.Text + Mid(nilai.Text, g, 1) * (8 ^ (Len(nilai.Text) - g))

Next g

End If

End Sub

Private Sub btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexit.Click

response = MsgBox("Apakah Anda yakin ingin keluar", MsgBoxStyle.OkCancel, "Konfirmasi Keluar")

If response = MsgBoxResult.Ok Then

End

End If

End Sub

Private Sub btnreset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnreset.Click

nilai.Text = ""

hasil.Text = ""

End Sub

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

End Sub

End Class

Untuk mendownload laporan dan program serta source kodenya dapat di download di link di bawah ini

NAMA_NRP_KELOMPOK_Aplikasi Konverter_octal_Desimal

Aplikasi Konverter Octal-Desimal

2 thoughts on “Aplikasi Konversi Desimal – Octal

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s