eiiiiiiiiiiits...... saya hadir kembali di hadapan anda, kali ini saya akan membawakan sebuah postingan, yang tidak jauh berbeda dengan yang sebelumnya.
#ala_pembawa_berita haha #lol :D
pastinya anda semua tahu langkah awal membuatnya, karena postingan kali ini tidak jauh berbeda dengan yang sebelumnya. jadi saya langsung saja.
oke gan?? :D
1. siapkan form, lalu desain dan ubah name-nya. seperti gambar dibawah ini.
2. buat codingnya seperti ini.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
nik.Items.Add("PM010")
nik.Items.Add("PS111")
nik.Items.Add("KU101")
nik.Items.Add("GD100")
nik.Items.Add("PM011")
sta.Items.Add("MENIKAH")
sta.Items.Add("BELUM MENIKAH")
jab.Items.Add("KEPALA DEVISI")
jab.Items.Add("STAFF")
jab.Items.Add("WAKIL KEPALA")
For b = 1 To 10
ja.Items.Add(b)
Next
End Sub
Private Sub nik_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nik.SelectedIndexChanged
Dim x As String
x = Microsoft.VisualBasic.Left(nik.Text, 2)
If x = "PM" Then
bag.Text = "PEMASARAN"
nm.Text = "CITRA PUJI LESTARI"
ElseIf x = "PS" Then
bag.Text = "PERSONALIA"
nm.Text = "LIA SYAHFITRI"
ElseIf x = "KU" Then
bag.Text = "KEUANGAN"
nm.Text = "HAFIZATUL HASANAH"
ElseIf x = "GD" Then
bag.Text = "GUDANG"
nm.Text = "MUHAMMAD HIDAYAT"
End If
End Sub
Private Sub jab_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles jab.SelectedIndexChanged
If jab.Text = "KEPALA DEVISI" Then
gapok.Text = 5000000
paj.Text = 10 / 100 * gapok.Text
ElseIf jab.Text = "STAFF" Then
gapok.Text = 2000000
paj.Text = 10 / 100 * gapok.Text
ElseIf jab.Text = "WAKIL KEPALA" Then
gapok.Text = 3500000
paj.Text = 10 / 100 * gapok.Text
End If
End Sub
Private Sub sta_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sta.SelectedIndexChanged
If sta.Text = "MENIKAH" Then
tk.Text = 15 / 100 * Val(gapok.Text)
Else
tk.Text = 0
ja.Text = False
ta.Text = 0
toga.Text = Val(gapok.Text) - Val(paj.Text)
End If
End Sub
Private Sub ja_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ja.SelectedIndexChanged
If ja.Text = "1" Then
ta.Text = 5 / 100 * gapok.Text
ElseIf ja.Text = "2" Then
ta.Text = 10 / 100 * gapok.Text
Else
ta.Text = 10 / 100 * gapok.Text
End If
toga.Text = Val(gapok.Text) + Val(tk.Text) + Val(ta.Text) - Val(paj.Text)
End Sub
Private Sub hps_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hps.Click
nik.Text = ""
nm.Text = ""
bag.Text = ""
jab.Text = ""
gapok.Text = ""
paj.Text = ""
sta.Text = ""
ja.Text = ""
tk.Text = ""
ta.Text = ""
toga.Text = ""
End Sub
Private Sub kel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kel.Click
Me.Close()
End Sub
End Class
3. tekan F5, maka akan muncul gambar seperti ini.
oke... mudah bukan???
semoga bermanfaat ya gan.
jangan lupa di like and d coment ea guys :)
Home »
Belajar Bahasa Program (vb)
» Penghitungan Gaji Pegawai
Penghitungan Gaji Pegawai
Written By Unknown on Senin, 18 November 2013 | 09.01
Label:
Belajar Bahasa Program (vb)
Posting Komentar