HOME ABOUT DOWNLOAD e-BOOK FREE DOWNLOAD BUSINES
INFO BEASISWA
Info Beasiswa S1 S2 S3
lowongan kerja di rumah Belajar Informatika Gratis
Pengen internetan murah, dan akses internet cepat...? click barner di bawah

PELUANG BISNIS GRATIS

Rabu, 30 Desember 2009

Contoh Program Sederhana Dengan Visual Basic 6.0

Membuat fungsi terbilang dengan Visual basic 6.0
Program Fungsi terbilang sangant sering digunakan dalam pembuatan aplikasi yang berhubungan dengan uang. Berikut kita akan belajar bagaimana cara membuat program fungsi terbilang menggunakan Visual Basic 6.0
Contoh program fungsi terbilang dengan Visual Basic
  • Pertama-tama bukaklah program Visual basic 6.0, pilih “stanadard EXE” lalu klick Open. Jendela form dengan mode Standard EXE akan terbuka
  • Masukkan sebuah "Label" dan sebuah "TextBox" ke dalam area form sehingga tampak seperti gambar berikut.
  • Setelah itu, aktifkanjendela kode dan ketiklah kode berikut :



Function word2(ByVal x As Currency) As StringDim satuan As Variant

satuan = Array("", "Satu", "Dua", "Tiga", "Empat", "Lima", "Enam", "Tujuh", "Delapan", "Sembilan", "Sepuluh", "Sebelas")
Select Case x
Case 0 To 11
word2 = " " + satuan(Fix(x))
Case 12 To 19
word2 = word2(x Mod 10) + " Belas"
Case 20 To 99
word2 = word2(Fix(x / 10)) + " Puluh" + word2(x Mod 10)
Case 100 To 199
word2 = " Seratus" + word2(x - 100)
Case 200 To 999
word2 = word2(Fix(n / 100)) + " Ratus" + word2(x Mod 100)
Case 1000 To 1999
word2 = "Seribu" + word2(x - 1000)
Case 2000 To 999999
word2 = word2(Fix(x / 1000)) + " Ribu" + word2(x Mod 1000)
Case 1000000 To 999999999
word2 = word2(Fix(x / 1000000)) + " Juta" + word2(x Mod 1000000)
Case 1000000000 To 1999999999
word2 = word2(Fix(x / 1000000000)) + " Milyar" + word2(x Mod 1000000000)
Case Else
word2 = "Angka sudah melampawi batas. Program ini cuman samapai 1.999.999.999"
End Select
End Function
  • Lalu klick ganda pada bagian "TextBoox" dan ketikkan kode berikut


Private Sub Text1_Change()
On Error Resume Next

If Text1 <> "" Then
Label1 = word2(Text1) + " Rupiah"

Else
Label1 = ""
End If

End Sub
  • Cobalah program yang anda buat dengan menekan F5 dan lihat hasilnya.
Selamat mencoba...

INTERNET TV

Watch TV - Live online internet televisionAccess to 4000 live TV stations from your pc. No need of a TV tuner or decoder. 100% legal - no subscription needed.

Watch television channels online anywhere. All you need is our software, your pc, and Internet connection. Thousands of television shows that would cost you big money in the long run with traditional TV providers, now can watch them with no subscription. Watch 4000 TV Stations from Over 80 Countries!

Cartoons, Fashion, News, Discovery, Sport, Movies, Music, Football, Adult Shows, Weather, Stocks, Educational, and many others channels are available.

You can watch TV to your PC or laptop at any time and anywhere in the world since our service is not affected by regional terrain or weather.

This webtv software does not contain any spyware or advertise modules. It has safety installation with NO WORRIES concerning valuable information loss.

WATCH TV NOW. LIMITED TIME OFFER.

PASTI PANAS
lowongan kerja di rumah