refresh tree view that reflects the Hard Drive. 
Author Message
 refresh tree view that reflects the Hard Drive.

Hello all!

I'm creating a tree view that reflects my hard drive folders and sub
folders.
everything is working just fine, but...

in my application(in the same form) I have an option to create another
folders.
when I'm creating a new folder and I try to rebuild the tree I can't see the
folder I have created till I exit my application(it is not enough to exit
the form) and enter again.

this problem is like you are adding a folder to the hard drive through an
application while the windows explorer is open and you can't see this folder
in the windows explorer until you refresh it(it happens with my application
too).

how can I make my tree view to present my folder too(when I rebuild it).
please, I don't want to add it artificially.

this is how I create my tree(recursion):

GetFullTree "C:\Missions" , "Root"

Private Sub GetFullTree(folder As String, ParentKey As String)

    Dim fldr As folder
    Dim tmpFolder As folder

    Set tmpFolder = fso.GetFolder(folder)
    If tmpFolder.SubFolders.Count < 1 Then Exit Sub

    For Each fldr In tmpFolder.SubFolders
        Set mNode = tvwMsn.Nodes.Add(ParentKey, tvwChild, fldr.Name,
fldr.Name)
        mNode.Image = 2
        mNode.SelectedImage = 1
        GetFullTree fldr.Path, mNode.key
    Next
End Sub

Advanced thanks, Avi.



Sun, 24 Oct 2004 14:15:23 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. refresh tree view that reflects the Hard Drive.

2. Refresh a tree view

3. VB4 Tree View-displaying drives, directories like explorer

4. VB : tree view and drive list box controls

5. VB : tree view and drive list box controls

6. How to read the hard drives drive no.

7. Insert records from a database in floppy drive to hard drive

8. Hard Drive Serial Number/Total Drive Size

9. tree view and list view..

10. Tree View Control as file view

11. Tree View / List View

12. List View to Tree View

 

 
Powered by phpBB® Forum Software