Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Windows VB.NET
Hi all
 
I wrote the below to and loading the data in listview
 
  Try
            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"
                                    LBox.Items.Add(SubChildEntry.Name)
                            End Select
                        Next
 
                End Select
            Next
        Catch Excep As Exception
            MsgBox("Error While Reading Directories")
        Finally
            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 22:51pm

1 solution

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

Solution 1

chek this link
http://www.vbdotnetforums.com/windows-forms/39160-listbox-items-do-not-refresh.html[^]
 
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
Timer1.Start()
 
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
  Permalink  
v2
Comments
OneInNineMillion at 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
0 Sergey Alexandrovich Kryukov 395
1 George Jonsson 349
2 CPallini 335
3 BillWoodruff 314
4 OriginalGriff 227
0 OriginalGriff 5,030
1 CPallini 4,225
2 Sergey Alexandrovich Kryukov 3,604
3 George Jonsson 2,831
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 16 Jan 2013
Copyright © CodeProject, 1999-2014
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