membuat menu pada-MDIForm

MEMBUAT MENU MENGGUNAKAN MDIForm

LISTING PROGRAM :

Private Sub aplikasi_Click()

Form1.Show

End Sub

 

Private Sub hurufmutu_Click()

uhurufmutu.Show

End Sub

 

Private Sub penjualantiket_Click()

tiketkeretaapi.Show

End Sub

 

Private Sub programpenjualan_Click()

Fo.Show

End Sub

 

Private Sub ptpulangpetang_Click()

uptpulangpetang.Show

End Sub

 

 

APLIKASI PERHITUNGAN GAJI

Listing Program:

Private Sub Command1_Click()

Dim a, b, c, d, e, f As Integer

txtd.Text = Val(Txta.Text) + Val(Txtb.Text) – Val(txtc.Text)

txte.Text = Val(txtd.Text) * (0.1)

txtf.Text = Val(txtd.Text) – Val(txte.Text)

End Sub

 

Private Sub Command2_Click()

Txta.SetFocus

Txta.Text = “”

Txtb.Text = “”

txtc.Text = “”

txtd.Text = “”

txte.Text = “”

txtf.Text = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

HURUF MUTU MAHASISWA

Listing Program:

Private Sub Combo1_Click()

Dim nama, jurusan As String

 

Select Case Combo1.Text

Case “11100013″

nama = “ADE IRFAN SETIAWAN”

jurusan = “SISTEM INFORMASI”

 

Case “11100014″

nama = “SONI F”

jurusan = “SISTEM INFORMASI”

 

Case “11100156″

nama = ” ADITYA”

jurusan = “MANAJEMEN INFORMATIKA”

 

Case “10100157″

nama = “VANESSA”

jurusan = “MANAJEMEN INFORMATIKA”

 

End Select

Text1.Text = nama

Text2.Text = jurusan

Text3.SetFocus

 

End Sub

 

Private Sub Command1_Click()

Dim kuis, tugas, uts, uas, na As Integer

Dim hm As String

kuis = Val(Text3.Text)

tugas = Val(Text4.Text)

uts = Val(Text5.Text)

uas = Val(Text6.Text)

na = Val(kuis + tugas + uts + uas) / 4

Text7.Text = na

 

Select Case Text7.Text

Case Is > 80

hm = “A”

 

Case Is > 70

hm = “B”

 

Case Is > 60

hm = “C”

 

Case Is > 50

hm = “D”

 

Case Is < 50

hm = “E”

 

End Select

Text8.Text = hm

End Sub

 

Private Sub Command2_Click()

Unload Me

End Sub

 

Private Sub Command3_Click()

Combo1.Text = “”

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Text8.Text = “”

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “11100013″

Combo1.AddItem “11100014″

Combo1.AddItem “11100156″

Combo1.AddItem “10100157″

End Sub

 

 

 

Private Sub Text3_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text4.SetFocus

End If

End Sub

 

 

 

Private Sub Text4_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text5.SetFocus

End If

End Sub

 

 

Private Sub Text5_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text6.SetFocus

End If

End Sub

 

 

 

 

PT PULANG PETANG

LISTING PROGRAM:

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtnama.SetFocus

End Sub

 

Private Sub cmddelete_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdedit_Click()

Data1.Recordset.Edit

End Sub

 

 

 

Private Sub CMDPROSES_Click()

Dim s As String

s = Left(txtnik.Text, 3)

If s = “KEU” Then

txtbagian.Text = “ACCOUNTING”

 

ElseIf s = “ADM” Then

txtbagian.Text = “ADMINISTRATION”

 

ElseIf s = “SDM” Then

txtbagian.Text = “GENERAL AFFAIR”

 

ElseIf s = “EDP” Then

txtbagian.Text = “IT UNIT”

 

ElseIf s = “SPM” Then

txtbagian.Text = “SECURITY”

End If

 

s = Mid(txtnik.Text, 9, 1)

If s = “A” Then

txtgolongan.Text = “A”

txtjabatan.Text = “MANAGER”

txtgapok.Text = “3000000″

txttunjangan.Text = “875000″

 

ElseIf s = “B” Then

txtgolongan.Text = “B”

txtjabatan.Text = “KA SEKSI”

txtgapok.Text = “2500000″

txttunjangan.Text = “525000″

 

ElseIf s = “C” Then

txtgolongan.Text = “C”

txtjabatan.Text = “STAFF”

txtgapok.Text = “2000000″

txttunjangan.Text = “325000″

End If

 

txttotalgaji.Text = Val(txttunjangan.Text) + Val(txtgapok.Text)

 

s = Mid(txtnik.Text, 5, 4)

txttahun.Text = s

 

s = Right(txtnik.Text, 1)

If s = “S” Then

txtkodestatus.Text = “S”

txtstatus.Text = “SINGLE”

 

ElseIf s = “M” Then

txtkodestatus.Text = “M”

txtstatus.Text = “MENIKAH”

 

ElseIf s = “D” Then

txtkodestatus.Text = “D”

txtstatus.Text = “DUDA”

 

ElseIf s = “J” Then

txtkodestatus.Text = “J”

txtstatus.Text = “JANDA”

End If

End Sub

 

Private Sub cmdsave_Click()

Data1.Recordset.Update

End Sub

Private Sub Command4_Click()

End

End Sub

 

Private Sub txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnik.SetFocus

End If

End Sub

 

 

PENJUALAN TIKET KERETA API:

LISTING PROGRAM:

Private Sub CMDPROSES_Click()

Dim d, a, b, c As String

Txtkt.Text = Left(Txtkt.Text, 3)

If LCase(Txtkt.Text) = “eko” Then

 

a = “50000″

b = “ekonomi”

c = “15:00″

d = “”

 

TXTHt.Text = a

TXTJt.Text = b

TXTjb.Text = c

txttb.Text = d

TXTJpl.SetFocus

 

 

ElseIf LCase(Txtkt.Text) = “bim” Then

 

a = “300000″

b = “BIMA”

c = “16:00″

d = “”

TXTHt.Text = a

TXTJt.Text = b

TXTjb.Text = c

txttb.Text = d

TXTJpl.SetFocus

 

 

 

ElseIf LCase(Txtkt.Text) = “mut” Then

a = “300000″

b = “mutiara”

c = “16:00″

d = “”

 

TXTHt.Text = a

TXTJt.Text = b

TXTjb.Text = c

txttb.Text = d

TXTJpl.SetFocus

 

 

ElseIf LCase(Txtkt.Text) = “sen” Then

a = “15000″

b = “SENJA”

c = “19:00″

d = “”

 

TXTHt.Text = a

TXTJt.Text = b

TXTjb.Text = c

txttb.Text = d

TXTJpl.SetFocus

End If

End Sub

 

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub Cmdlagi_Click()

Txtkt.SetFocus

Txtkt.Text = “”

TXTHt.Text = “”

TXTJt.Text = “”

TXTjb.Text = “”

txttb.Text = “”

TXTJpl.Text = “”

 

End Sub

Private Sub TXTJpl_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttb.Text = Val(TXTHt.Text) * Val(TXTJpl.Text)

End If

End Sub

 

PROGRAM PENJUALAN BARANG:

LISTING PROGRAM:

 

 

Private Sub cbokode_Click()

Dim hrg, brg As Variant

Select Case cbokode.Text

Case “P-12″

txtbrg = “PRINTER”

Txthrg = “850000″

Case “E-10″

txtbrg = “MONITOR”

Txthrg = “750000″

Case “K-98″

txtbrg = “CPU”

Txthrg = “1500000″

Case “BM-78″

txtbrg = “MOUSE”

Txthrg = “30000″

End Select

 

End Sub

 

Private Sub cbokode_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtbayar.SetFocus

End If

End Sub

 

Private Sub Command1_Click()

txtbayar = Val(Txthrg.Text) * Val(txtpembelian.Text)

End Sub

 

 

Private Sub Command2_Click()

cbokode.SetFocus

txtbrg.Text = “”

Txthrg = “”

txtpembelian = “”

txtbyr = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

cbokode.AddItem “P-12″

cbokode.AddItem “E-10″

cbokode.AddItem “K-98″

cbokode.AddItem “BM-78″

End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: