Click here to Skip to main content
13,289,653 members (59,658 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi all

I wrote the below to and loading the data in listview

            ParentEntry.Path = "WinNT:"
            For Each childEntry In ParentEntry.Children
                Select Case childEntry.SchemaClassName
                    Case "Domain"
                        SubParentEntry.Path = "WinNT://" & childEntry.Name
                        For Each SubChildEntry In SubParentEntry.Children
                            Select Case SubChildEntry.SchemaClassName
                                Case "Computer"
                            End Select
                End Select
        Catch Excep As Exception
            MsgBox("Error While Reading Directories")
            ParentEntry = Nothing
        End Try

now i want to referesh this after a certain interval of time..please tel me how to do..

Thank you
Posted 15-Jan-13 23:51pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

chek this link[^]

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ListBox1.Items.Add("First Item")
ListBox1.Items.Add("Second Item")
ListBox1.Items.Add("Third Item")
ListBox1.Items.Add("Fourth Item")
ListBox1.SelectedIndex = 0
Timer1.Interval = 500
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim i As Integer
i = ListBox1.SelectedIndex
i = i + 1
If i > ListBox1.Items.Count - 1 Then i = 0
ListBox1.SelectedIndex = i
End Sub
OneInNineMillion 17-Jan-13 3:52am
That link seems very helpful. The code doesn't seem to do what's suggested on the other forums though.
Darn ListBoxes, I would just avoid using them lol. Pro approach. Challenge Avoided!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171207.1 | Last Updated 16 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100