making a program that has five lisboxes

theazza

Member
Joined
May 20, 2011
Messages
23
Programming Experience
1-3
this is my code till now, i no most of it doesnt make sense but i dont know the most efficient way of making a program that has five lisboxes (4 are classes 1 is absent list) of names but each class can only have 10 student and the user should be able to move student to other classes as required

THANKS EVERYONE!

Imports System.IO
Public Class lblTitle

Private Sub btnsatcl_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSatcl.Click

Dim entry1 As String = lstWedmo.SelectedItem
lstWedmo.Items.Remove(entry1)
lstSatcl.Items.Add(entry1)

Dim entry2 As String = lstWedcl.SelectedItem
lstWedcl.Items.Remove(entry2)
lstSatcl.Items.Add(entry2)

Dim entry3 As String = lstTuemo.SelectedItem
lstTuemo.Items.Remove(entry3)
lstSatcl.Items.Add(entry3)

End Sub

Private Sub lblTitle_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'The following code READS text from the textfile to the listbox one line at a time

Dim studentallocation1 As StreamReader = File.OpenText("wednesdaycloud.txt")

Do While studentallocation1.Peek <> -1
lstWedcl.Items.Add(studentallocation1.ReadLine())
Loop
studentallocation1.Close()


Dim studentallocation2 As StreamReader = File.OpenText("wednesdayMotoko.txt")

Do While studentallocation2.Peek <> -1
lstWedmo.Items.Add(studentallocation2.ReadLine())
Loop
studentallocation2.Close()


Dim studentallocation3 As StreamReader = File.OpenText("saturdaycloud.txt")

Do While studentallocation3.Peek <> -1
lstSatcl.Items.Add(studentallocation3.ReadLine())
Loop
studentallocation3.Close()


Dim studentallocation4 As StreamReader = File.OpenText("tuesdaymotoko.txt")

Do While studentallocation4.Peek <> -1
lstTuemo.Items.Add(studentallocation4.ReadLine())
Loop
studentallocation4.Close()

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'The following code WRITES text back into the textfile from the listbox one line at a time

Dim allocation1 As StreamWriter = File.CreateText("wednesdaycloud.txt")
For Each entry As Object In lstWedcl.Items
allocation1.WriteLine(entry)
Next
allocation1.Close()


Dim allocation2 As StreamWriter = File.CreateText("wednesdayMotoko.txt")
For Each entry As Object In lstWedmo.Items
allocation2.WriteLine(entry)
Next
allocation2.Close()


Dim allocation3 As StreamWriter = File.CreateText("saturdaycloud.txt")
For Each entry As Object In lstSatcl.Items
allocation3.WriteLine(entry)
Next
allocation3.Close()


Dim allocation4 As StreamWriter = File.CreateText("tuesdaymotoko.txt")
For Each entry As Object In lstTuemo.Items
allocation4.WriteLine(entry)
Next
allocation4.Close()


End
End Sub

Private Sub btnWedcl_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWedcl.Click

Dim entry1 As String = lstWedmo.SelectedItem
Dim entry2 As String = lstSatcl.SelectedItem

If lstWedmo.SelectedIndex >= 0 Then
lstWedmo.Items.Remove(entry1)
lstWedcl.Items.Add(entry1)
If lstWedmo.SelectedIndex >= 0 Then
lstSatcl.Items.Remove(entry2)
lstWedcl.Items.Add(entry2)
End If
End If

'If lstWedmo.SelectedIndex >= 0 Then
'lstWedmo.Items.Remove(entry1)
'lstWedcl.Items.Add(entry1)
'End If





'Dim entry2 As String = lstSatcl.SelectedItem
'Dim entry3 As String = lstTuemo.SelectedItem

'If lstWedmo.SelectedItem Then
'lstWedmo.Items.Remove(entry1)
'lstWedcl.Items.Add(entry1)
'Return

'lstSatcl.Items.Remove(entry2)
'lstWedcl.Items.Add(entry2)
'Return

'lstTuemo.Items.Remove(entry3)
'lstWedcl.Items.Add(entry3)
'Return


End Sub

Private Sub btnWedmo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWedmo.Click

Dim entry4 As String = lstWedcl.SelectedItem
lstWedcl.Items.Remove(entry4)
lstWedmo.Items.Add(entry4)

Dim entry5 As String = lstSatcl.SelectedItem
lstSatcl.Items.Remove(entry5)
lstWedmo.Items.Add(entry5)

Dim entry6 As String = lstTuemo.SelectedItem
lstTuemo.Items.Remove(entry6)
lstWedmo.Items.Add(entry6)

End Sub

Private Sub btntuemo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btntuemo.Click

When
Dim entry7 As String = lstWedcl.SelectedItem
lstWedcl.Items.Remove(entry7)
lstTuemo.Items.Add(entry7)


Dim entry8 As String = lstSatcl.SelectedItem
lstSatcl.Items.Remove(entry8)
lstTuemo.Items.Add(entry8)

Dim entry9 As String = lstWedmo.SelectedItem
lstWedmo.Items.Remove(entry9)
lstTuemo.Items.Add(entry9)

End Sub
End Class
 
Your in luck, Heres Working Code (yours rewritten)

...:p sorry about posting so much content on this thread at once...

Okay, so i think your the same person that asked about moving items between 5 listboxes?

Anyways i stubbled upon this post of yours and read your code. For the most part i think i understand what the concept and goal is?:confused: It looks like you have everything done except for the part where you prevent the user from moving a item if the total will end up to be more than 10 students in a listbox.

From looking at your code i get the feeling that you might not understand some of the stuff i used in the code pasted below... You should def catch up on some reading if you dont, however what i used in the code below is not necessary to accomplish this task, i just wrote it like this because i felt it was the fastest way to code it, it reduces code redundancy. (took me about 15-30mins to write) {..of course this can be done with even less lines of code if that was the objective...} This code should work for any number of listboxes, you can add as much as you want and it should still work. I only briefly debugged it to save time, so there could be some bugs in this code.

if you'd like i can explain what i did below in detail, just PM me or something.


if your wonder why i wrote all this code.. it's because i program for fun, its my hobby and thats all i practically do for 80% of my day when i dont have classes/work.:cool:



This is the code that is relevant, i removed the file output function just because i didn't feel like editing that. I hope this is what your looking for... I also came up with some methods to do multiple selections form each listbox but i think this is enough for now...

below this block is the same code but it includes the GUI. Here is a link to a zip file of the solution thats on my webserver http://www.flippedbeyond.com/DropBox/21345tyghf543/attendanceprogramtheazza_05212011.zip

Imports System.IO
Public Class lblTitle
    'did not modify this function, could be rewritten better though
    Private Sub lblTitle_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        'The following code READS text from the textfile to the listbox one line at a time

        Dim studentallocation1 As StreamReader = File.OpenText("wednesdaycloud.txt")

        Do While studentallocation1.Peek <> -1
            lstWedcl.Items.Add(studentallocation1.ReadLine())
        Loop
        studentallocation1.Close()


        Dim studentallocation2 As StreamReader = File.OpenText("wednesdayMotoko.txt")

        Do While studentallocation2.Peek <> -1
            lstWedmo.Items.Add(studentallocation2.ReadLine())
        Loop
        studentallocation2.Close()


        Dim studentallocation3 As StreamReader = File.OpenText("saturdaycloud.txt")

        Do While studentallocation3.Peek <> -1
            lstSatcl.Items.Add(studentallocation3.ReadLine())
        Loop
        studentallocation3.Close()


        Dim studentallocation4 As StreamReader = File.OpenText("tuesdaymotoko.txt")

        Do While studentallocation4.Peek <> -1
            lstTuemo.Items.Add(studentallocation4.ReadLine())
        Loop
        studentallocation4.Close()

    End Sub

    'button click events
    Private Sub btnsatcl_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSatcl.Click
        validateThenMove(lstSatcl)
    End Sub
    Private Sub btnWedcl_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWedcl.Click
        validateThenMove(lstWedcl)
    End Sub
    Private Sub btnWedmo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWedmo.Click
        validateThenMove(lstWedmo)
    End Sub
    Private Sub btntuemo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btntuemo.Click
        validateThenMove(lstTuemo)
    End Sub
    Private Sub btnAbsent_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAbsent.Click
        validateThenMove(lstAbsent)
    End Sub

    ''' <summary>
    ''' Make sure the listbox will only have a total of 10 items after the move, if not show a messagebox
    ''' </summary>
    ''' <param name="lstBox">the list box to move the items into</param>
    Sub validateThenMove(ByRef lstBox As ListBox)
        'get a count of the selected items, excluding the listbox that the items will go into
        Dim selectedLstBoxes As Integer = getCountOfSelectedItems(lstBox)

        'check that the total will be <= 10 after the move
        If (selectedLstBoxes + lstBox.Items.Count) <= 10 Then
            moveAllSelectedItemsToListBox(lstBox, getAllLst(lstBox), True)

        Else
            'show message
            MessageBox.Show(String.Format("The listbox currently contains {0}, you have selected {1} students to move, please unselect {2} students.", lstBox.Items.Count, selectedLstBoxes, (lstBox.Items.Count + selectedLstBoxes) - 10))
        End If
    End Sub

    ''' <summary>
    ''' Gets a count of the total selected items
    ''' </summary>
    ''' <param name="toExclude">the listbox to exclude form the count</param>
    ''' <returns>the count of selected items</returns>
    Function getCountOfSelectedItems(Optional ByRef toExclude As ListBox = Nothing) As Integer
        Dim count As Integer = 0

        Dim lstBoxes As ListBox() = getAllLst()

        For Each lstBox As ListBox In lstBoxes

            If lstBox.SelectedIndex > -1 Then 'if there is an item selected

                If toExclude Is Nothing Then
                    count += 1

                Else 'if there is a listbox to exclude
                    If Not lstBox.Equals(toExclude) Then 'if the listboxes are different
                        count += 1
                    End If
                End If
            End If
        Next

        Return count
    End Function

    ''' <summary>
    ''' Creates an array of listboxes
    ''' </summary>
    ''' <param name="toExclude">a listbox to exclude from the arraylist</param>
    ''' <returns>an array of listboxes</returns>
    Function getAllLst(Optional ByRef toExclude As ListBox = Nothing) As ListBox()
        'create an arraylist of all the listboxes on this page
        Dim lstBoxes As New ArrayList
        lstBoxes.Add(lstSatcl)
        lstBoxes.Add(lstTuemo)
        lstBoxes.Add(lstWedcl)
        lstBoxes.Add(lstWedmo)
        lstBoxes.Add(lstAbsent)

        If Not (toExclude Is Nothing) Then 'if a listbox is to be excluded
            lstBoxes.Remove(toExclude) ' remove it
        End If

        Return lstBoxes.ToArray(GetType(ListBox))
    End Function

    ''' <summary>
    ''' Move all of the selected items from an array of listboxes to one listbox
    ''' </summary>
    ''' <param name="moveTo">the listbox to move the items to</param>
    ''' <param name="fromListBoxs">an array of listboxes to get the items from</param>
    ''' <param name="disregardSelection">if set to true this function will always return true, does not check that every listbox passed in had a selection</param>
    ''' <returns>true if all items were moved unless disregardselection is true which would return true regardless</returns>
    ''' <remarks>this may not be the best approach, could be re-written better</remarks>
    Function moveAllSelectedItemsToListBox(ByRef moveTo As ListBox, ByRef fromListBoxs() As ListBox, ByVal disregardSelection As Boolean) As Boolean
        If Not disregardSelection Then
            'for each listbox that is in the array of listboxes to get the item from
            For Each lstBox As ListBox In fromListBoxs
                If Not moveSelectedTo(lstBox, moveTo) Then 'if no item was moved
                    Return False 'return false and stop the loop
                End If
            Next

        Else
            'for each listbox that is in the array of listboxes to get the item from
            For Each lstBox As ListBox In fromListBoxs
                moveSelectedTo(lstBox, moveTo)
            Next

        End If

        Return True 'if it made it here it succeeded
    End Function

    ''' <summary>
    ''' Moves a item from one listbox to another
    ''' </summary>
    ''' <param name="lstFrom">The listbox to remove the item from</param>
    ''' <param name="lstTo">the listbox the item will go to</param>
    ''' <returns>true if the item was moved</returns>
    Function moveSelectedTo(ByRef lstFrom As ListBox, ByRef lstTo As ListBox) As Boolean
        Dim itemMoved As Boolean = False

        'make sure the to and from listbox are different
        If lstFrom.Name <> lstTo.Name Then
            Dim selectedIndex As Integer = lstFrom.SelectedIndex

            'check that a item is selected
            If selectedIndex > -1 Then 'set
                'store the item
                Dim selectedItem As Object = lstFrom.Items(selectedIndex)
                'add the item to destination 
                lstTo.Items.Add(selectedItem)


                'remove the item from origin
                lstFrom.Items.RemoveAt(selectedIndex)
                itemMoved = True
            Else
                itemMoved = False
            End If

        Else
            itemMoved = False
        End If


        Return itemMoved
    End Function

    'clears all the selections
    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
        Dim lstBoxes() As ListBox = getAllLst()

        For Each lst As ListBox In lstBoxes
            lst.ClearSelected()
        Next
    End Sub
End Class








This is code that will run if you copy and paste, Same as above but with GUI
Imports System.IO
Public Class lblTitle
    Private Sub lblTitle_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim nFrm As Form = New lblTitle_CONDENSED

        nFrm.Show()
    End Sub
End Class

Public Class lblTitle_CONDENSED
    Inherits System.Windows.Forms.Form

    'did not modify this function, could be rewritten better though
    Private Sub lblTitle_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        'The following code READS text from the textfile to the listbox one line at a time

        Dim studentallocation1 As StreamReader = File.OpenText("wednesdaycloud.txt")

        Do While studentallocation1.Peek <> -1
            lstWedcl.Items.Add(studentallocation1.ReadLine())
        Loop
        studentallocation1.Close()


        Dim studentallocation2 As StreamReader = File.OpenText("wednesdayMotoko.txt")

        Do While studentallocation2.Peek <> -1
            lstWedmo.Items.Add(studentallocation2.ReadLine())
        Loop
        studentallocation2.Close()


        Dim studentallocation3 As StreamReader = File.OpenText("saturdaycloud.txt")

        Do While studentallocation3.Peek <> -1
            lstSatcl.Items.Add(studentallocation3.ReadLine())
        Loop
        studentallocation3.Close()


        Dim studentallocation4 As StreamReader = File.OpenText("tuesdaymotoko.txt")

        Do While studentallocation4.Peek <> -1
            lstTuemo.Items.Add(studentallocation4.ReadLine())
        Loop
        studentallocation4.Close()

    End Sub

    'button click events
    Private Sub btnsatcl_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSatcl.Click
        validateThenMove(lstSatcl)
    End Sub
    Private Sub btnWedcl_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWedcl.Click
        validateThenMove(lstWedcl)
    End Sub
    Private Sub btnWedmo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWedmo.Click
        validateThenMove(lstWedmo)
    End Sub
    Private Sub btntuemo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btntuemo.Click
        validateThenMove(lstTuemo)
    End Sub
    Private Sub btnAbsent_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAbsent.Click
        validateThenMove(lstAbsent)
    End Sub

    ''' <summary>
    ''' Make sure the listbox will only have a total of 10 items after the move, if not show a messagebox
    ''' </summary>
    ''' <param name="lstBox">the list box to move the items into</param>
    Sub validateThenMove(ByRef lstBox As ListBox)
        'get a count of the selected items, excluding the listbox that the items will go into
        Dim selectedLstBoxes As Integer = getCountOfSelectedItems(lstBox)

        'check that the total will be <= 10 after the move
        If (selectedLstBoxes + lstBox.Items.Count) <= 10 Then
            moveAllSelectedItemsToListBox(lstBox, getAllLst(lstBox), True)

        Else
            'show message
            MessageBox.Show(String.Format("The listbox currently contains {0}, you have selected {1} students to move, please unselect {2} students.", lstBox.Items.Count, selectedLstBoxes, (lstBox.Items.Count + selectedLstBoxes) - 10))
        End If
    End Sub

    ''' <summary>
    ''' Gets a count of the total selected items
    ''' </summary>
    ''' <param name="toExclude">the listbox to exclude form the count</param>
    ''' <returns>the count of selected items</returns>
    Function getCountOfSelectedItems(Optional ByRef toExclude As ListBox = Nothing) As Integer
        Dim count As Integer = 0

        Dim lstBoxes As ListBox() = getAllLst()

        For Each lstBox As ListBox In lstBoxes

            If lstBox.SelectedIndex > -1 Then 'if there is an item selected

                If toExclude Is Nothing Then
                    count += 1

                Else 'if there is a listbox to exclude
                    If Not lstBox.Equals(toExclude) Then 'if the listboxes are different
                        count += 1
                    End If
                End If
            End If
        Next

        Return count
    End Function

    ''' <summary>
    ''' Creates an array of listboxes
    ''' </summary>
    ''' <param name="toExclude">a listbox to exclude from the arraylist</param>
    ''' <returns>an array of listboxes</returns>
    Function getAllLst(Optional ByRef toExclude As ListBox = Nothing) As ListBox()
        'create an arraylist of all the listboxes on this page
        Dim lstBoxes As New ArrayList
        lstBoxes.Add(lstSatcl)
        lstBoxes.Add(lstTuemo)
        lstBoxes.Add(lstWedcl)
        lstBoxes.Add(lstWedmo)
        lstBoxes.Add(lstAbsent)

        If Not (toExclude Is Nothing) Then 'if a listbox is to be excluded
            lstBoxes.Remove(toExclude) ' remove it
        End If

        Return lstBoxes.ToArray(GetType(ListBox))
    End Function

    ''' <summary>
    ''' Move all of the selected items from an array of listboxes to one listbox
    ''' </summary>
    ''' <param name="moveTo">the listbox to move the items to</param>
    ''' <param name="fromListBoxs">an array of listboxes to get the items from</param>
    ''' <param name="disregardSelection">if set to true this function will always return true, does not check that every listbox passed in had a selection</param>
    ''' <returns>true if all items were moved unless disregardselection is true which would return true regardless</returns>
    ''' <remarks>this may not be the best approach, could be re-written better</remarks>
    Function moveAllSelectedItemsToListBox(ByRef moveTo As ListBox, ByRef fromListBoxs() As ListBox, ByVal disregardSelection As Boolean) As Boolean
        If Not disregardSelection Then
            'for each listbox that is in the array of listboxes to get the item from
            For Each lstBox As ListBox In fromListBoxs
                If Not moveSelectedTo(lstBox, moveTo) Then 'if no item was moved
                    Return False 'return false and stop the loop
                End If
            Next

        Else
            'for each listbox that is in the array of listboxes to get the item from
            For Each lstBox As ListBox In fromListBoxs
                moveSelectedTo(lstBox, moveTo)
            Next

        End If

        Return True 'if it made it here it succeeded
    End Function

    ''' <summary>
    ''' Moves a item from one listbox to another
    ''' </summary>
    ''' <param name="lstFrom">The listbox to remove the item from</param>
    ''' <param name="lstTo">the listbox the item will go to</param>
    ''' <returns>true if the item was moved</returns>
    Function moveSelectedTo(ByRef lstFrom As ListBox, ByRef lstTo As ListBox) As Boolean
        Dim itemMoved As Boolean = False

        'make sure the to and from listbox are different
        If lstFrom.Name <> lstTo.Name Then
            Dim selectedIndex As Integer = lstFrom.SelectedIndex

            'check that a item is selected
            If selectedIndex > -1 Then 'set
                'store the item
                Dim selectedItem As Object = lstFrom.Items(selectedIndex)
                'add the item to destination 
                lstTo.Items.Add(selectedItem)


                'remove the item from origin
                lstFrom.Items.RemoveAt(selectedIndex)
                itemMoved = True
            Else
                itemMoved = False
            End If

        Else
            itemMoved = False
        End If


        Return itemMoved
    End Function

    'clears all the selections
    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
        Dim lstBoxes() As ListBox = getAllLst()

        For Each lst As ListBox In lstBoxes
            lst.ClearSelected()
        Next
    End Sub




#Region "FROM DESIGNER - GENERATED"
    Sub New()
        MyBase.New()
        InitializeComponent()
    End Sub

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.lstWedcl = New System.Windows.Forms.ListBox()
        Me.lstWedmo = New System.Windows.Forms.ListBox()
        Me.lstSatcl = New System.Windows.Forms.ListBox()
        Me.lstTuemo = New System.Windows.Forms.ListBox()
        Me.lstAbsent = New System.Windows.Forms.ListBox()
        Me.btnWedcl = New System.Windows.Forms.Button()
        Me.btnWedmo = New System.Windows.Forms.Button()
        Me.btntuemo = New System.Windows.Forms.Button()
        Me.btnSatcl = New System.Windows.Forms.Button()
        Me.btnAbsent = New System.Windows.Forms.Button()
        Me.btnClear = New System.Windows.Forms.Button()
        Me.SuspendLayout()
        '
        'lstWedcl
        '
        Me.lstWedcl.FormattingEnabled = True
        Me.lstWedcl.Location = New System.Drawing.Point(12, 12)
        Me.lstWedcl.Name = "lstWedcl"
        Me.lstWedcl.Size = New System.Drawing.Size(206, 264)
        Me.lstWedcl.TabIndex = 0
        '
        'lstWedmo
        '
        Me.lstWedmo.FormattingEnabled = True
        Me.lstWedmo.Location = New System.Drawing.Point(257, 12)
        Me.lstWedmo.Name = "lstWedmo"
        Me.lstWedmo.Size = New System.Drawing.Size(206, 264)
        Me.lstWedmo.TabIndex = 1
        '
        'lstSatcl
        '
        Me.lstSatcl.FormattingEnabled = True
        Me.lstSatcl.Location = New System.Drawing.Point(483, 12)
        Me.lstSatcl.Name = "lstSatcl"
        Me.lstSatcl.Size = New System.Drawing.Size(206, 264)
        Me.lstSatcl.TabIndex = 2
        '
        'lstTuemo
        '
        Me.lstTuemo.FormattingEnabled = True
        Me.lstTuemo.Location = New System.Drawing.Point(706, 12)
        Me.lstTuemo.Name = "lstTuemo"
        Me.lstTuemo.Size = New System.Drawing.Size(206, 264)
        Me.lstTuemo.TabIndex = 3
        '
        'lstAbsent
        '
        Me.lstAbsent.FormattingEnabled = True
        Me.lstAbsent.Location = New System.Drawing.Point(939, 12)
        Me.lstAbsent.Name = "lstAbsent"
        Me.lstAbsent.Size = New System.Drawing.Size(206, 264)
        Me.lstAbsent.TabIndex = 4
        '
        'btnWedcl
        '
        Me.btnWedcl.Location = New System.Drawing.Point(66, 295)
        Me.btnWedcl.Name = "btnWedcl"
        Me.btnWedcl.Size = New System.Drawing.Size(75, 23)
        Me.btnWedcl.TabIndex = 5
        Me.btnWedcl.Text = "btnWedcl"
        Me.btnWedcl.UseVisualStyleBackColor = True
        '
        'btnWedmo
        '
        Me.btnWedmo.Location = New System.Drawing.Point(313, 296)
        Me.btnWedmo.Name = "btnWedmo"
        Me.btnWedmo.Size = New System.Drawing.Size(75, 23)
        Me.btnWedmo.TabIndex = 6
        Me.btnWedmo.Text = "btnWedmo"
        Me.btnWedmo.UseVisualStyleBackColor = True
        '
        'btntuemo
        '
        Me.btntuemo.Location = New System.Drawing.Point(760, 295)
        Me.btntuemo.Name = "btntuemo"
        Me.btntuemo.Size = New System.Drawing.Size(75, 23)
        Me.btntuemo.TabIndex = 7
        Me.btntuemo.Text = "btntuemo"
        Me.btntuemo.UseVisualStyleBackColor = True
        '
        'btnSatcl
        '
        Me.btnSatcl.Location = New System.Drawing.Point(547, 294)
        Me.btnSatcl.Name = "btnSatcl"
        Me.btnSatcl.Size = New System.Drawing.Size(64, 24)
        Me.btnSatcl.TabIndex = 8
        Me.btnSatcl.Text = "btnSatcl"
        Me.btnSatcl.UseVisualStyleBackColor = True
        '
        'btnAbsent
        '
        Me.btnAbsent.Location = New System.Drawing.Point(1006, 294)
        Me.btnAbsent.Name = "btnAbsent"
        Me.btnAbsent.Size = New System.Drawing.Size(75, 23)
        Me.btnAbsent.TabIndex = 9
        Me.btnAbsent.Text = "absent"
        Me.btnAbsent.UseVisualStyleBackColor = True
        '
        'btnClear
        '
        Me.btnClear.Location = New System.Drawing.Point(603, 395)
        Me.btnClear.Name = "btnClear"
        Me.btnClear.Size = New System.Drawing.Size(194, 23)
        Me.btnClear.TabIndex = 10
        Me.btnClear.Text = "clear Selected"
        Me.btnClear.UseVisualStyleBackColor = True
        '
        'lblTitle
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(1189, 535)
        Me.Controls.Add(Me.btnClear)
        Me.Controls.Add(Me.btnAbsent)
        Me.Controls.Add(Me.btnSatcl)
        Me.Controls.Add(Me.btntuemo)
        Me.Controls.Add(Me.btnWedmo)
        Me.Controls.Add(Me.btnWedcl)
        Me.Controls.Add(Me.lstAbsent)
        Me.Controls.Add(Me.lstTuemo)
        Me.Controls.Add(Me.lstSatcl)
        Me.Controls.Add(Me.lstWedmo)
        Me.Controls.Add(Me.lstWedcl)
        Me.Name = "lblTitle"
        Me.Text = "Form1"
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents lstWedcl As System.Windows.Forms.ListBox
    Friend WithEvents lstWedmo As System.Windows.Forms.ListBox
    Friend WithEvents lstSatcl As System.Windows.Forms.ListBox
    Friend WithEvents lstTuemo As System.Windows.Forms.ListBox
    Friend WithEvents lstAbsent As System.Windows.Forms.ListBox
    Friend WithEvents btnWedcl As System.Windows.Forms.Button
    Friend WithEvents btnWedmo As System.Windows.Forms.Button
    Friend WithEvents btntuemo As System.Windows.Forms.Button
    Friend WithEvents btnSatcl As System.Windows.Forms.Button
    Friend WithEvents btnAbsent As System.Windows.Forms.Button
    Friend WithEvents btnClear As System.Windows.Forms.Button

#End Region

End Class




Hope that helps, if not... Enjoy the free code. :D
 
Back
Top