Listing
Public Class Form1
Private Sub Form1_Load(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) HandlesMyBase.Load
With ComboBox1
.Items.Add("Nanda")
.Items.Add("Aryo")
.Items.Add("Menik")
.Items.Add("Intan")
End With
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal
e As System.EventArgs)
Handles ComboBox1.SelectedIndexChanged
If ComboBox1.Text = ("Nanda")
Then
TextBox1.Text = ("2000000")
TextBox2.Text = ("25000")
End If
If ComboBox1.Text = ("Aryo")
Then
TextBox1.Text = ("1500000")
TextBox2.Text = ("25000")
End If
If ComboBox1.Text = ("Menik")
Then
TextBox1.Text = ("6000000")
TextBox2.Text = ("25000")
End If
If ComboBox1.Text = ("Intan")
Then
TextBox1.Text = ("4500000")
TextBox2.Text = ("25000")
End If
End Sub
Private Sub Button2_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button2.Click
MsgBox("Makasih yeee..")
Close()
End Sub
Private Sub Button1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button1.Click
Dim totalgaji As Integer
Dim gajipokok As Integer
Dim uangmakan As Integer
gajipokok = Val(TextBox1.Text)
uangmakan = Val(TextBox2.Text) * Val(NumericUpDown1.Value)
totalgaji = gajipokok + uangmakan
TextBox3.Text = totalgaji
End Sub
Tidak ada komentar:
Posting Komentar