View Single Post
  #4 (permalink)  
Old 12-01-2008, 7:12 PM
Spilled Spilled is offline
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Nov 2008
Location: USA
Age: 22
Posts: 14
Reputation: 18
Spilled is on a distinguished programming path ahead
Default

Ok I've been playing around with this a little and here is what i just found out
Code:
    Public ReadOnly Property GetCombo() As String
        Get
            If lbWordlist.InvokeRequired Then
                Return GetTheCombo()
            ElseIf tbWordlist.InvokeRequired Then
                Return GetTheCombo()
            Else
                Return GetTheCombo()
            End If
        End Get
    End Property
    Public Function GetTheCombo() As String
        Dim tmp As String
        tmp = lbWordlist.Items.Item(tbWordlist.Value - 1)
        If tbWordlist.Value = tbWordlist.Maximum Then
            StopBots = True
        Else
            tbWordlist.Value += 1
        End If
        Return tmp
    End Function
Both of the controls.invokerequired are false but my problem still exists... im getting an outofrange error when i access lbWordlist.items.item(...
and my tbWordlist.Maximum is back at 1 when i load my txt into lbWordlist i stop and check the values and they are correct. It's like im working with a different control. Does anyone know why it would be doing this?
Reply With Quote