Penjelasan :
Aplikasi sederhana yang saya buat adalah tentang sebuah perusahaan jasa transportasi bus. dimana terdapat 4 kota tujuan yaitu Jakarta,Bandung,Palembang dan Dumai. Bus yang disediakan terdiri dari 3 class yaitu Bisnis, Executive dan Super Executive .
Untuk pemesanan tiket, bagi penumpang yang membeli tiket sebanyak 3 tiket atau lebih mendapat diskon 10% untuk masing-masing tiket .
Screenshot :
Coding :
Public Class Form1
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.Text = "BUKITTINGGI - PADANG - JAKARTA" Then
TextBox1.Text = 200000
TextBox2.Text = 250000
TextBox3.Text = 300000
ElseIf ComboBox1.Text = "BUKITTINGGI - PADANG - BANDUNG" Then
TextBox1.Text = 250000
TextBox2.Text = 300000
TextBox3.Text = 350000
ElseIf ComboBox1.Text = "BUKITTINGGI - PADANG - PALEMBANG" Then
TextBox1.Text = 150000
TextBox2.Text = 200000
TextBox3.Text = 250000
ElseIf ComboBox1.Text = "BUKITTINGGI - DUMAI" Then
TextBox1.Text = 100000
TextBox2.Text = 150000
TextBox3.Text = 200000
ElseIf ComboBox1.Text = "JAKARTA - PADANG - BUKITTINGGI" Then
TextBox1.Text = 200000
TextBox2.Text = 250000
TextBox3.Text = 300000
ElseIf ComboBox1.Text = "BANDUNG - PADANG - BUKITTINGGI" Then
TextBox1.Text = 250000
TextBox2.Text = 300000
TextBox3.Text = 350000
ElseIf ComboBox1.Text = "PALEMBANG - PADANG - BUKITTINGGI" Then
TextBox1.Text = 150000
TextBox2.Text = 200000
TextBox3.Text = 250000
ElseIf ComboBox1.Text = "DUMAI - BUKITTINGGI" Then
TextBox1.Text = 100000
TextBox2.Text = 150000
TextBox3.Text = 200000
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If RadioButton1.Checked Then
TextBox4.Text = TextBox1.Text
ElseIf RadioButton2.Checked Then
TextBox4.Text = TextBox2.Text
ElseIf RadioButton3.Checked Then
TextBox4.Text = TextBox3.Text
End If
If TextBox5.Text >= 3 Then
TextBox6.Text = TextBox4.Text * 0.1 * TextBox5.Text
ElseIf TextBox5.Text < 3 Then
TextBox6.Text = 0
End If
TextBox7.Text = TextBox4.Text * TextBox5.Text - TextBox6.Text
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim x As String
x = MsgBox("ARE YOU SURE ?", MsgBoxStyle.YesNo + MsgBoxStyle.Question, "PO SINAR HARAPAN")
If x = vbNo Then
Else
End
End If
End Sub
End Class
Data Mahasiswa :
Nama : Mhd. Dio ferdian
NPM : 1006724482
Mhd. Dio Ferdian
Minggu, 03 April 2011
Minggu, 06 Maret 2011
Colour treme
Untuk tugas visual basic saya membuat aplikasi sederhana yang berfungsi untuk menentukan harga total dari penjualan baju.
Penjelasan program :
didalam program ini terdapat :
-Harga Barang
-Jumlah Barang
-Diskon Barang
-Total Harga Barang
screenshoot :
Coding :
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = 30000
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox1.Text = 40000
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
TextBox1.Text = 30000
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
TextBox1.Text = 60000
End Sub
Private Sub TextBox3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox3.Click
TextBox3.Text = TextBox1.Text * TextBox2.Text
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
TextBox4.Text = TextBox3.Text * 0.05
End Sub
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
TextBox4.Text = TextBox3.Text * 0.15
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
TextBox5.Text = TextBox3.Text - TextBox4.Text
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim x As Integer
x = MsgBox("are you sure ?", MsgBoxStyle.YesNo, "Colour Treme")
If x = vbYes Then
End
End If
End Sub
Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim x As Integer
x = MsgBox("are you sure ?", MsgBoxStyle.YesNo, "Colour Treme")
If x = vbYes Then
End
End If
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
TextBox1.Text = " "
TextBox2.Text = " "
TextBox3.Text = " "
TextBox4.Text = " "
TextBox5.Text = " "
End Sub
End Class
Data Mahasiswa :
Nama : Mhd Dio Ferdian
NPM : 1006724482
Penjelasan program :
didalam program ini terdapat :
-Harga Barang
-Jumlah Barang
-Diskon Barang
-Total Harga Barang
screenshoot :
Coding :
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = 30000
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
TextBox1.Text = 40000
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
TextBox1.Text = 30000
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
TextBox1.Text = 60000
End Sub
Private Sub TextBox3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox3.Click
TextBox3.Text = TextBox1.Text * TextBox2.Text
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
TextBox4.Text = TextBox3.Text * 0.05
End Sub
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
TextBox4.Text = TextBox3.Text * 0.15
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
TextBox5.Text = TextBox3.Text - TextBox4.Text
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim x As Integer
x = MsgBox("are you sure ?", MsgBoxStyle.YesNo, "Colour Treme")
If x = vbYes Then
End
End If
End Sub
Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim x As Integer
x = MsgBox("are you sure ?", MsgBoxStyle.YesNo, "Colour Treme")
If x = vbYes Then
End
End If
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
TextBox1.Text = " "
TextBox2.Text = " "
TextBox3.Text = " "
TextBox4.Text = " "
TextBox5.Text = " "
End Sub
End Class
Data Mahasiswa :
Nama : Mhd Dio Ferdian
NPM : 1006724482
Langganan:
Postingan (Atom)