0% found this document useful (0 votes)
11 views4 pages

Program Form Input Data Siswa

The document provides code for a multi-dimensional array application in Visual Basic. It includes code to: 1. Create a multi-dimensional array to store student data and populate form controls like listviews and comboboxes from the array values. 2. Add a new student's data to the listview when a process button is clicked by getting values from textboxes and comboboxes. 3. Include code to close the form and update labels with the current date, 12-hour time and 24-hour time when a timer tick event occurs.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

Program Form Input Data Siswa

The document provides code for a multi-dimensional array application in Visual Basic. It includes code to: 1. Create a multi-dimensional array to store student data and populate form controls like listviews and comboboxes from the array values. 2. Add a new student's data to the listview when a process button is clicked by getting values from textboxes and comboboxes. 3. Include code to close the form and update labels with the current date, 12-hour time and 24-hour time when a timer tick event occurs.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Array

1. Buatlah tampilan sebagai berikut:

2. Ubahlah Properti seperti tampilan berikut:


No Objek Property Nilai Properti
1 Form1 Text Array Multi Dimensi
2 Label1 Text NIS
3 Label2 Text NAMA
4 Label3 Text JURUSAN
5 Label4 Text KELAS
6 Label5 Name Lbl12Jam
7 Label6 Name Lbl24Jam
8 Timer1 Enable True
Interval 100
9 Textbox1 Name TxtNIS
10 Textbox2 Name TxtNama
11 ComboBox1 Name Cmbjurusan
12 ComboBox2 Name Cmbkelas
13 Button1 Name BtnProses
Text Proses
Flatstyle Standard
14 Button2 Name BtnExit
Text Exit
Flatstyle Standard
15 ListView1 Name ListView1

Buatlah Kode Program Tiap event,


Sebagai Berikut :

Public Class Form1

Private Sub Form1_Load(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
Dim Arr(3, 1) As String
Arr(0, 0) = "NIS"
Arr(0, 1) = "NAMA"
Arr(1, 0) = "JURUSAN"
Arr(1, 1) = "KELAS"
Arr(2, 0) = "TKJ"
Arr(2, 1) = "TGB"
Arr(3, 0) = "XI TKJ 1"
Arr(3, 1) = "XI TKJ 2"

[Link] = True
[Link] = [Link]

For Baris = 0 To 1
For Kolom = 0 To 1
[Link](Arr(Baris, Kolom), 100)
Next Kolom
Next Baris

For Baris = 2 To 2
For Kolom = 0 To 1
[Link](Arr(Baris, Kolom))
Next Kolom
Next Baris

For Baris = 3 To 3
For Kolom = 0 To 1
[Link](Arr(Baris, Kolom))
Next Kolom
Next Baris
End Sub

Private Sub BtnProses_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
Dim Arr(3) As String
Arr(0) = [Link]
Arr(1) = [Link]
Arr(2) = [Link]
Arr(3) = [Link]

Dim listitem As ListViewItem


listitem = New ListViewItem
listitem = [Link](Arr(0))
[Link](Arr(1))
[Link](Arr(2))
[Link](Arr(3))
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link]()
End Sub

Private Sub Button1_Click(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
[Link]()
End Sub

Private Sub Timer1_Tick(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
[Link] = Format(Now, "hh:mm:ss tt")
[Link] = Format(Now, "H:mm:ss")
[Link] = Format(Now, "dddd, dd – MMMM – yyyy")
End Sub

End Class
HASIL:

You might also like