We help IT Professionals succeed at work.
Get Started

vb.net recording variation of change in listview

87 Views
Last Modified: 2016-08-05
I am looking for assistance with code the displays the change in value of a column in a list view

example this column changes every 3 seconds.  It clears the listview and writes the new values
so the column values would need to be store before clearing the some comparing of stored value to new value

let say these are the start values
column 0    Column 1
1                   0
2                   0
4                   0
2                   0
3                   0
5                   0

after 3 second

column 0              Column 1
1 goes to 4           3
2 goes to 3           1
4 goes to 1           -3
2 goes to 5           3
3 goes to 1           -2
5 goes to 4           -1

the code i am working with is
#Region "RunnerPoolDristrabution"
    Private poollist As New ArrayList
    Public Sub RunnerDistrabution()
        Dim i As Decimal = 0
        Dim ipool As Decimal = 0
        Dim q As Decimal = 0
        Dim count As Integer = 0



        For Each item As ListViewItem In ListView7.Items

            i = (winpool - ipool) / CDec(item.SubItems(1).Text)
            item.SubItems(8).Text = (i + (0.2 * i)).ToString("N2")
            If poollist(count).ToString <> item.SubItems(8).Text Then
                poollist.    ((i + (0.2 * i)).ToString("N2"))
            End If
            ipool = ipool + i
            count += 1
        Next
        For Each item As ListViewItem In ListView7.Items
            q = CDec(item.SubItems(8).Text)
            item.SubItems(9).Text = (i + (0.2 * i) - CDec(q)).ToString("N2")
        Next


    End Sub

#End Region

Open in new window

Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE