6.12.2008


Seekor ular kecil bertanya kepada ibunya, "Ibu apakah kita ini ular yang beracun?"


"Oh tentu anakku. Jadi kalau ada yang mencoba mengganggumu, gigit saja maka pasti ia akan mati karena racun dalam bisa kita," jawab ibunya dengan antusias.

"Oooops ....." sahut si ular kecil.

"Lho ada apa, Nak ... kamu menggigit sesuatu??!!!" tanya ibunya.

"Ah ... bagaimana kalau aku menggigit lidahku sendiri?"

5.16.2008

Jenaka

Seekor ular kecil bertanya kepada ibunya, "Ibu apakah kita ini ular yang beracun?"

"Oh tentu anakku. Jadi kalau ada yang mencoba mengganggumu, gigit saja maka pasti ia akan mati karena racun dalam bisa kita," jawab ibunya dengan antusias.

"Oooops ....." sahut si ular kecil.

"Lho ada apa, Nak ... kamu menggigit sesuatu??!!!" tanya ibunya.

"Ah ... bagaimana kalau aku menggigit lidahku sendiri?"

5.13.2008

5.02.2008

Program Sederhana Harga Pembelian Komputer


anda ingin membuat program sederhana untuk daftar pembelian komputer

1. Desain sebuah form dengan menggunakan Label, Text box, Command Button, List box, Picture. Ubahlah nilai properti dari setiap control / komponen.. Desain seperti gambar

Komponen Properti
7 Label Caption DAFTAR HARGA PEMBELIAN KOMPUTER,
Jumlah Unit, Nomor Pilihan, Harga,
Diskon, Total, Total Bayar
5 Text Box Name Txtjumlah, txtpilihan, txtharga,
txtdiskon, txttotal, txtot
Text Dikosongkan
1 List box Name lstdaftar
list Monitor, CPU, Motherboard,
Processor, Harddisk, Floppydisk,
CD – ROM, RAM
1 Picture box Name Picdaftar
Picture None
3 Command Button Name Cmdhitung, cmddatabaru, cmdkeluar
Caption HITUNG, DATA BARU, KELUAR

2. Masukkan Listing Program berikut ini :

Dim pilihan As Integer
Dim harga As Currency
Dim jumlah As Integer
Dim bayar As Currency
Dim diskon As Single
Dim total As Currency
Private Sub cmddatabaru_Click()
txtjumlah.Text = ""
txtpilihan.Text = ""
txtharga.Text = ""
txtdiskon.Text = ""
txttotal.Text = ""
txttot.Text = ""
picdaftar.Visible = False
lstdaftar.ListIndex = 0
End Sub
Private Sub cmdhitung_Click()
If txtjumlah.Text = "" Then
MsgBox "Anda belum masukkan jumlah unit", vbOKOnly + vbInformation, "Isi Data"
lstdaftar.SetFocus
Exit Sub
End If
txtpilihan.Text = lstdaftar.Text
Select Case lstdaftar.Text
Case "Monitor"
picdaftar.Visible = True
txtharga.Text = 500000
picdaftar.Picture = LoadPicture("D:\Student Day\data\monitor.jpg")
Case "CPU"
picdaftar.Visible = True
txtharga.Text = 100000
picdaftar.Picture = LoadPicture("D:\Student Day\data\CPU.jpg")
Case "Motherboard"
picdaftar.Visible = True
txtharga.Text = 1350000
picdaftar.Picture = LoadPicture("D:\Student Day\data\motherboard.jpg")
Case "Processor"
picdaftar.Visible = True
txtharga.Text = 1550000
picdaftar.Picture = LoadPicture("D:\Student Day\data\processor.jpg")
Case "Harddisk"
picdaftar.Visible = True
txtharga.Text = 775000
picdaftar.Picture = LoadPicture("D:\Student Day\data\harddisk.jpg")
Case "Floppydisk"
picdaftar.Visible = True
txtharga.Text = 70000
picdaftar.Picture = LoadPicture("D:\Student Day\data\floppy.jpg")
Case "CD - ROM"
picdaftar.Visible = True
txtharga.Text = 150000
picdaftar.Picture = LoadPicture("D:\Student Day\data\cdrom.jpg")
Case "RAM"
picdaftar.Visible = True
txtharga.Text = 225000
picdaftar.Picture = LoadPicture("D:\Student Day\data\ram.jpg")
End Select

jumlah = txtjumlah.Text
harga = txtharga.Text
total = jumlah * harga
If txtjumlah.Text > 10 Then
diskon = total * 0.1
Else
diskon = total * 0
End If
txtdiskon.Text = diskon
txttotal.Text = total
txttot.Text = total - txtdiskon.Text
End Sub
Private Sub cmdkeluar_Click()
End
End Sub
Private Sub Form_Load()
lstdaftar.AddItem "Monitor"
lstdaftar.AddItem "CPU"
lstdaftar.AddItem "Motherboard"
lstdaftar.AddItem "Processor"
lstdaftar.AddItem "Harddisk"
lstdaftar.AddItem "Floppydisk"
lstdaftar.AddItem "CD - ROM"
lstdaftar.AddItem "RAM"
End Sub

3. Eksekusi atau compile program dengan menekan tombol F5 dikeyboard atau dengan mengklik icon start pada menu bar. Maka akan muncul tampilan seperti gambar

4.18.2008

PROGRAM SEDERHANA WITH VB 6.0



Anda ingin mencoba program sederhana dengan Visual Basic 6.0 untuk menu makanan diwarteg coba aja lihat contohnya disini. Program komputerisasi bukan hanya direstoran bintang 7 aja kamu juga bisa buat di warteg langganan kamu :O :O
***** SELAMAT MENCOBA *****

1. Desain sebuah form dengan menggunakan Frame, Label, Text box, Command button, dan Option Button. Ubahlah nilai properti dari setiap control / komponen.. Desain seperti gambar 1.1

Komponen Properti
7 Label Caption DAFTAR MENU RUMAH MAKAN 99,
Jl. Golf no. 21 Ciriung Cibinong,
HARGA MAKANAN, HARGA MINUMAN,
BAYAR, TOTAL, KEMBALI
5 Text Box Name Text1, text2, text3, text4, text5
Text Dikosongkan
11 Option Button Name Option1, Option2, Option3,
Option4, Option5, Option6, Option7,
Option8, Option9, Option10, Option11
Caption Nasi Uduk, Nasi Goreng, Ayam Bakar,
Tempe/Tahu Goreng, Ikan Bakar,
Sate Ayam, Sate Kambing, Sop Buntut,
Soft Drink, Air Mineral, Aneka Jus
2 Frame Name Frame1, Frame2
Caption DAFTAR MENU MAKANAN RM. 99,
DAFTAR MINUMAN RM. 99
3 Command Button Name Command1, Command2
Caption HITUNG, DATA BARU, KELUAR

2. Masukkan Listing program dibawah ini

Dim makan As Currency
Dim minum As Currency
Dim total As Currency
Dim bayar As Currency
Dim kembali As Currency
Private Sub Command1_Click()
If Text3.Text = "" Then
MsgBox "input bayar belum diisi", vbOKOnly + vbInformation, "isi data"
Else
makan = Text1.Text
minum = Text2.Text
bayar = Text3.Text
total = makan + minum
Text4.Text = total
kembali = bayar - total
Text5.Text = kembali
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Option5.Value = False
Option6.Value = False
Option7.Value = False
Option8.Value = False
Option9.Value = False
Option10.Value = False
Option11.Value = False
Command2.SetFocus
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
Text1.Text = 5000
End If
End Sub
Private Sub Option10_Click()
If Option10.Value = True Then
Text2.Text = 2000
End If
End Sub
Private Sub Option11_Click()
If Option11.Value = True Then
Text2.Text = 5000
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
Text1.Text = 8000
End If
End Sub
Private Sub Option3_Click()
If Option3.Value = True Then
Text1.Text = 9000
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True Then
Text1.Text = 1500
End If
End Sub
Private Sub Option5_Click()
If Option5.Value = True Then
Text1.Text = 20000
End If
End Sub
Private Sub Option6_Click()
If Option6.Value = True Then
Text1.Text = 12000
End If
End Sub
Private Sub Option7_Click()
If Option7.Value = True Then
Text1.Text = 12000
End If
End Sub
Private Sub Option8_Click()
If Option8.Value = True Then
Text1.Text = 8000
End If
End Sub
Private Sub Option9_Click()
If Option9.Value = True Then
Text2.Text = 3000
End If
End Sub

3. Eksekusi atau compile program dengan menekan tombol F5 dikeyboard atau dengan mengklik icon start pada menu bar

4. Ini yang paling kita tunggu - tunggu yaitu selesai