Anda di halaman 1dari 3

Nama :Rimalya Widian

Kelas :KMA-R31/19
NPM :19306031
Latihan Visual basic 2010

Tampilan awal

alat yang dipakai:


-Toolbox +properties
-Label
-Combo box
-Radio button
-List box
-button

Code yang dipakai :


Public Class Form1
'--- deklarasi sub program ---
Sub comboJenis()
Me.CbJenis.Items.Add("minibus")
Me.CbJenis.Items.Add("sedan")
Me.CbJenis.Items.Add("Truck")
Me.CbJenis.Items.Add("Bus")
Me.CbJenis.Items.Add("box")
Me.CbJenis.Items.Add("Motor-sport")
Me.CbJenis.Items.Add("Motor-bebek")
End Sub
Sub combobagian()
Me.CbBagian.Items.Add("Gudang")
Me.CbBagian.Items.Add("adminitrasi")
Me.CbBagian.Items.Add("SIM")
Me.CbBagian.Items.Add("Operational")
Me.CbBagian.Items.Add("Umum")

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
'--- mengisi properti objek Form
Me.Text = "Data Kendaraan"
Me.ControlBox = False
Me.BackColor = Color.DarkSeaGreen
Me.StartPosition = FormStartPosition.CenterScreen
Me.LbJudul.Font = New System.Drawing.Font("Times New Roman", 18.75!,
System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.LbJudul.ForeColor = System.Drawing.SystemColors.Window
Me.RbOperational.Checked = True 'memberi nilai awal

'--- memanggil sub program ---


comboJenis() combobagian()

End Sub

Private Sub BtnClose_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles BtnClose.Click
Me.Close()
End Sub

End Class