Halaman

Rabu, 07 Oktober 2015

Aplikasi Penghitung Pangkat 3

Hai Guys lama nih ga update postingan, karena di sibukkan sama banyak kerjaan yang menumpuk. Pada postingan kali ini, saya akan sedikit berbagi dengan kalian tentang sebuah aplikasi sederhana sih, tapi semoga bermanfaat buat kalian yang newbi yang mengawali belajar Visual Basic 5.0 :) Aplikasi ini saya beri nama Aplikasi Penghitung Pangkat

* Desain Form


* Setting Properties

Form 1
Caption : Aplikasi Penghitung Pangkat
ControlBox : False

Label 1
Caption : Input
AutoSize : True
Font : 14

Label 2
Caption : 3
AutoSize : True

Label 3
Name : lblHasil
Caption : ....HASIL....
AutoSize : True
Font : 14



Text 1
Name : txtInput
Text : "Kosngkan"
Font : 14

Command 1
Name : cmdProses
Caption : Proses
Font : 14

Command 2
Name : cmdHapus
Caption : Hapus
Font : 14

Command 3
Name : cmdTutup
Caption : TUTUP
Font : 14



* SOURCE CODE / KODE PROGRAM


Private Sub cmdHapus_Click()
    txtInput.Text = ""
    lblHasil.Caption = "....HASIL...."
    txtInput.SetFocus
  
End Sub

Private Sub cmdProses_Click()
    If txtInput.Text = "" Then
        MsgBox ("Masukkan angka pada Input!"), vbInformation, "Peringatan"
        txtInput.SetFocus
    Else
        lblHasil.Caption = "Hasil " & txtInput.Text & " pangkat 3 adalah " & txtInput.Text ^ 3
    End If
  
End Sub

Private Sub cmdTutup_Click()
    End
  
End Sub



SELAMAT MENCOBA BROTHER AND SISTER,,, SEMOGA BERMANFAAT.... 
(^_^)

2 komentar: