0% found this document useful (0 votes)
34 views2 pages

Shaja - Dwiputra Object Eventargs: ":: Anda Belum Memasukkan Pilihan::"

The document describes a Visual Basic .NET program with 5 buttons and 2 list boxes. Button1 moves a selected item from ListBox1 to ListBox2. Button2 moves all items from ListBox1 to ListBox2. Button3 moves a selected item from ListBox2 to ListBox1. Button4 moves all items from ListBox2 to ListBox1. Button5 searches ListBox1 for items starting with the text in TextBox1 and displays any matches in ListBox2, or a message if no matches are found.

Uploaded by

it surya husadha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views2 pages

Shaja - Dwiputra Object Eventargs: ":: Anda Belum Memasukkan Pilihan::"

The document describes a Visual Basic .NET program with 5 buttons and 2 list boxes. Button1 moves a selected item from ListBox1 to ListBox2. Button2 moves all items from ListBox1 to ListBox2. Button3 moves a selected item from ListBox2 to ListBox1. Button4 moves all items from ListBox2 to ListBox1. Button5 searches ListBox1 for items starting with the text in TextBox1 and displays any matches in ListBox2, or a message if no matches are found.

Uploaded by

it surya husadha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Nama : I Made Shaja Dwiputra

NIM
: 14101040

Tugas Rumah :
Public Class Shaja_Dwiputra
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
If ListBox1.SelectedIndex < 0 Then
MsgBox(":: Anda Belum Memasukkan Pilihan ::")
Else
Dim i As Integer
For i = 1 To ListBox1.SelectedItems.Count
ListBox2.Items.Add(ListBox1.SelectedItems.Item(0))
ListBox1.Items.Remove(ListBox1.SelectedItems.Item(0))
Next
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
Dim i As Integer
For i = 1 To ListBox1.Items.Count
ListBox2.Items.Add(ListBox1.Items.Item(0))
ListBox1.Items.RemoveAt(0)
Next
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button3.Click
ListBox1.Items.Add(ListBox2.SelectedItem)
ListBox2.Items.Remove(ListBox2.SelectedItem)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button4.Click
Dim i As Integer
For i = 1 To ListBox2.Items.Count
ListBox1.Items.Add(ListBox2.Items.Item(0))
ListBox2.Items.RemoveAt(0)
Next
End Sub

Mencari Nama di Menu Search : >>>>


==========================================================
=============================
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button5.Click
ListBox2.Items.Clear()
Dim count As Integer = (ListBox1.Items.Count - 1)
Dim words As String
Dim dIntCounter As Integer
Dim dBlnDataDitemukan As Boolean
dBlnDataDitemukan = False
For dIntCounter = 0 To count
words = ListBox1.Items.Item(dIntCounter)
If words.Substring(0, Len(TextBox1.Text)).ToLower = TextBox1.Text.ToLower Then
ListBox2.Items.Add(words)
dBlnDataDitemukan = True
End If
Next
If dBlnDataDitemukan = False Then
MessageBox.Show("Maaf Anda Kurang Beruntung, DataNya Tidak ADA ")
End If
End Sub
End Class

Ketik di Menu :
ba >>> trs
tekan tombol
Search nanti
kalau Ada
datanya akan
muncul di

You might also like