Page 1 of 2 12 LastLast
Results 1 to 40 of 54

Thread: "Add New Folder" button in "Folder Browser" for Win 98

  1. #1

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    "Add New Folder" button in "Folder Browser" for Win 98

    hello,

    i searched the forum but the NewDialog style of BrowseFolder API doesn't work for 98.

    i believe that user need to make its own dialog system for that purpose. but i am unable to use TreeView control properly. could someone please explain it to me.

    plus how can i Add and delete folders (in general coding and in treeview also).

    thnx.

    PS - I am waiting Hack

    sister thread of this thread
    Last edited by Harsh Gupta; Dec 19th, 2005 at 12:36 PM. Reason: adding a link
    Show Appreciation. Rate Posts.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Harsh Gupta
    PS - I am waiting Hack
    Patience my New Delhi friend, is a virtue.

    This was written by Matt Hart
    VB Code:
    1. Option Explicit
    2.  
    3. Private Const MAX_PATH = 260
    4. Private Const FILE_ATTRIBUTE_DIRECTORY = &H10
    5.  
    6. Private Type FILETIME
    7.     dwLowDateTime As Long
    8.     dwHighDateTime As Long
    9. End Type
    10.  
    11. Private Type WIN32_FIND_DATA
    12.     dwFileAttributes As Long
    13.     ftCreationTime As FILETIME
    14.     ftLastAccessTime As FILETIME
    15.     ftLastWriteTime As FILETIME
    16.     nFileSizeHigh As Long
    17.     nFileSizeLow As Long
    18.     dwReserved0 As Long
    19.     dwReserved1 As Long
    20.     cFileName As String * MAX_PATH
    21.     cAlternate As String * 14
    22. End Type
    23.  
    24. Private Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" _
    25. (ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long
    26.  
    27. Private Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA" _
    28. (ByVal hFindFile As Long, lpFindFileData As WIN32_FIND_DATA) As Long
    29.  
    30. Private Declare Function FindClose Lib "kernel32" (ByVal hFindFile As Long) As Long
    31.  
    32. Private Type DirInfo
    33.     DirName     As String
    34. End Type
    35.  
    36. Private bCancel As Boolean
    37.  
    38. Private Sub FindDirs(D$, T As TreeView)
    39.     Static bFirstIn As Boolean
    40.    
    41.     If bCancel Then Exit Sub
    42.    
    43.     Dim nx As Node, C$
    44.     Dim N As Integer, Srch$, i As Integer, NewD$
    45.    
    46.     C$ = D$
    47.     If Right$(C$, 1) <> "\" Then C$ = C$ & "\"
    48.    
    49.     If Not bFirstIn Then
    50.         bFirstIn = True
    51.         Set nx = T.Nodes.Add(, , C$, C$)
    52.     End If
    53.    
    54.     Srch$ = C$ & "*.*"
    55.     ReDim Dees(1 To 10) As DirInfo
    56.     Call LoadDirs(Dees(), N, Srch$)
    57.    
    58.     DoEvents
    59.    
    60.     If N Then
    61.         For i = 1 To N
    62.             Set nx = T.Nodes.Add(C$, 4, Dees(i).DirName, LastPath$(Left$(Dees(i).DirName, Len(Dees(i).DirName) - 1)))
    63.         Next
    64.     Else
    65.         Exit Sub
    66.     End If
    67.    
    68.     For i = 1 To N
    69.         NewD$ = RTrim$(Dees(i).DirName)
    70.         Call FindDirs(NewD$, T)
    71.     Next
    72. End Sub
    73.  
    74. Private Function LastPath$(P$)
    75.     Dim i
    76.     For i = Len(P$) To 1 Step -1
    77.         If Mid$(P$, i, 1) = "\" Then
    78.             LastPath$ = Mid$(P$, i + 1)
    79.             Exit For
    80.         End If
    81.     Next
    82. End Function
    83.  
    84. Private Sub LoadDirs(D() As DirInfo, N As Integer, Srch$)
    85.     Dim a$, Max As Integer, i As Integer, k As Integer, W32 As WIN32_FIND_DATA, fHandle As Long, lResult As Long
    86.     Dim oPath$
    87.     Max = UBound(D)
    88.     N = 0
    89.    
    90.     oPath$ = Left$(Srch$, Len(Srch$) - Len(LastPath$(Srch$)))
    91.    
    92.     fHandle = FindFirstFile(Srch$, W32)
    93.  
    94.     If fHandle Then
    95.         Do
    96.             a$ = Left$(W32.cFileName, InStr(W32.cFileName, Chr$(0)) - 1)
    97.             If a$ <> "." And a$ <> ".." And ((W32.dwFileAttributes And FILE_ATTRIBUTE_DIRECTORY) > 0) Then
    98.                 N = N + 1
    99.                 If Max < N Then
    100.                     Max = Max + 10
    101.                     ReDim Preserve D(1 To Max) As DirInfo
    102.                 End If
    103.                 D(N).DirName = oPath$ & a$ & "\"
    104.             End If
    105.             DoEvents
    106.             If bCancel Then Exit Do
    107.             lResult = FindNextFile(fHandle, W32)
    108.         Loop While lResult
    109.         lResult = FindClose(fHandle)
    110.     End If
    111.    
    112.     If bCancel Then Exit Sub
    113.  
    114.     For i = 1 To N - 1
    115.         For k = i + 1 To N
    116.             If UCase$(D(i).DirName) > UCase$(D(k).DirName) Then
    117.                 a$ = D(k).DirName
    118.                 D(k).DirName = D(i).DirName
    119.                 D(i).DirName = a$
    120.             End If
    121.         Next
    122.     Next
    123. End Sub
    124.  
    125. Private Sub Command1_Click()
    126.     Static Done
    127.     If Done Then Exit Sub
    128.     Done = True
    129.     bCancel = False
    130.     Command1.Caption = "Cancel"
    131.     Call FindDirs("C:\", TV)
    132.     Command1.Caption = "Fill It!"
    133.     MsgBox "Done!"
    134.     Done = False
    135. End Sub

  3. #3

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    thank you Hack. but there are few questions:

    - it's only listing C: and not others like D:, E:, F: etc

    - when i tried to click "Fill Up!", it showed an error

    run-time error '35602':

    Key is not unique in collection
    and highlights
    VB Code:
    1. For i = 1 To N
    2.             [hl]Set nx = T.Nodes.Add(C$, 4, Dees(i).DirName, LastPath$(Left$(Dees(i).DirName, Len(Dees(i).DirName) - 1)))[/hl]
    3.         Next

    - it takes some time in listing folders, why so?

    - how can i show it like the pic you posted in the other thread?

    - the cancel button is not working.
    Show Appreciation. Rate Posts.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Harsh Gupta
    thank you Hack. but there are few questions:

    - it's only listing C: and not others like D:, E:, F: etc

    - when i tried to click "Fill Up!", it showed an error
    What was the error? It doesn't error when I run it.
    Quote Originally Posted by Harsh Gupta
    - it takes some time in listing folders, why so?
    Because of the number of folders you have on your PC. That routine takes about 20 minutes to finish if I run it on mine (I have over 200 folders just under \Source Code\VB6 )
    Quote Originally Posted by Harsh Gupta
    - how can i show it like the pic you posted in the other thread?
    You would need to add an image control, some icons that you want to represent folders and link the image control to the treeview.
    Quote Originally Posted by Harsh Gupta
    - the cancel button is not working.
    Yeah, I've never really liked the way he did the cancel thing. I would put a specific cancel button on the form and in its click event set bCancel to True.

  5. #5

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Hack
    What was the error? It doesn't error when I run it
    run-time error '35602':

    Key is not unique in collection
    and highlights

    VB Code:
    1. For i = 1 To N
    2.             [hl]Set nx = T.Nodes.Add(C$, 4, Dees(i).DirName, LastPath$(Left$(Dees(i).DirName, Len(Dees(i).DirName) - 1)))[/hl]
    3.         Next
    Show Appreciation. Rate Posts.

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Well, you error is very wierd then, because I don't get that error. It works just fine.

    In fact, I have attached the form I used to test this, and on my machine it just whipped right along.

    Download this form and load it into the project you are using, run it, and see what happens.
    Attached Files Attached Files

  7. #7

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Hack
    Well, you error is very wierd then, because I don't get that error. It works just fine.

    In fact, I have attached the form I used to test this, and on my machine it just whipped right along.

    Download this form and load it into the project you are using, run it, and see what happens.
    sorry to say, but same thing and same error
    Show Appreciation. Rate Posts.

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Harsh Gupta
    sorry to say, but same thing and same error
    I'm running XP Pro SP1. What do you have on your machine?

    Also, what VB service pack are you running? I'm running SP5.

  9. #9

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    I am using Win 98 (thats the original problem)

    without any SP. but does it make any difference?
    Show Appreciation. Rate Posts.

  10. #10
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Harsh Gupta
    without any SP. but does it make any difference?
    This is the difference. This is the BIG difference.

    SP5 contains a variety of patches and updates/grades to many of the VB controls with TreeView and ListView being two of them.

    I would suggest you download that service pack and apply it.

  11. #11

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Hack
    This is the difference. This is the BIG difference.

    SP5 contains a variety of patches and updates/grades to many of the VB controls with TreeView and ListView being two of them.

    I would suggest you download that service pack and apply it.
    all right. i will do it soon and revert back to you.

    but it will take some time since i am using telephone connection nowadays and it will take few days, for me to download that huge package, plus IE, plus MDAC : PHEW :

    for now
    Show Appreciation. Rate Posts.

  12. #12
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Don't you have a better/faster connection at your place of work?

    You could download it there, burn it to CD, and take the CD home.

    I do stuff like that for my father in-law all the time.

  13. #13

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Hack
    Don't you have a better/faster connection at your place of work?

    You could download it there, burn it to CD, and take the CD home.

    I do stuff like that for my father in-law all the time.
    if that's possible for me, i would have done that ages ago :LOL:

    but i have no option but to download it at home. and i have applied for the Broadband connection but it will require few days to get connected.

    ....place of work?
    still looking for job
    Show Appreciation. Rate Posts.

  14. #14

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    all right Hack, i am now ready to download the SP. but i have few queries-

    1) should i also download the Windows Update from MSDN? is it going to help me any ways?

    2) if i install VB SP6 instead of 5 (as you are using), does it make any difference?

    thank you.
    Show Appreciation. Rate Posts.

  15. #15
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Harsh Gupta
    all right Hack, i am now ready to download the SP. but i have few queries-

    1) should i also download the Windows Update from MSDN? is it going to help me any ways?
    I can only speculate on this as I haven't used 98 in a few years, but I'd say...sure, why not.
    Quote Originally Posted by Harsh Gupta
    2) if i install VB SP6 instead of 5 (as you are using), does it make any difference?
    Well, it will make a difference to your VB controls and that treeview code should work for you, but it is only going to affect VB.

  16. #16

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Well, it will make a difference to your VB controls and that treeview code should work for you, but it is only going to affect VB.
    couled you please elaborate on this one.
    Show Appreciation. Rate Posts.

  17. #17
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Harsh Gupta
    couled you please elaborate on this one.
    The reason you are installing the service pack is because you don't have a VB service pack installed and the VB controls you are using are way out of date. This is why the treeview code worked on my machine but not on yours. One of the things these service packs do it provide updates for many of the VB6 controls.

  18. #18

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    thank you but i knew that. all i wanted to know was will installing VB SP 6 make difference than installing SP5?
    Show Appreciation. Rate Posts.

  19. #19
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Harsh Gupta
    thank you but i knew that. all i wanted to know was will installing VB SP 6 make difference than installing SP5?
    That I couldn't tell you. Maybe someone else can. I'm still running SP5.

  20. #20

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    all right, then i will download SP6 and get back to this thread soon.
    Show Appreciation. Rate Posts.

  21. #21
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Harsh Gupta
    all right, then i will download SP6 and get back to this thread soon.
    As soon as you get it installed, try that treeview code.

    It should work.

  22. #22
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Btw I had completely forgotten about this fully featured browse dialog I've just found in the folder where I keep the cool stuff. It works great even under W98.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  23. #23

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Hack
    As soon as you get it installed, try that treeview code.

    It should work.
    all right Hack, i downloaded and installed VB SP6, but not much help and same problem i mentioned before. now what could be the problem?
    Show Appreciation. Rate Posts.

  24. #24
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Harsh Gupta
    all right Hack, i downloaded and installed VB SP6, but not much help and same problem i mentioned before. now what could be the problem?
    Good question. As you know, it works on my machine, and now that you have yours updated, it should be working on yours.

    Code that doesn't work, won't work anywhere, so if it works in one place, it should work in another. However, since it isn't, then we still have some kind of difference in our VB platforms. Are you using the form that I attached that I developed on my PC and works on my PC?

  25. #25
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    You'll get the error simply because you have two folders with the same name, since you use the folder name (instead of full path) as the Key. Just make sure the Key is unique.

  26. #26

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Hack
    Good question. As you know, it works on my machine, and now that you have yours updated, it should be working on yours.

    Code that doesn't work, won't work anywhere, so if it works in one place, it should work in another. However, since it isn't, then we still have some kind of difference in our VB platforms. Are you using the form that I attached that I developed on my PC and works on my PC?
    yes, i also tried using the form you attached before (except that you used a picturebox instead of a treeview ) and the same thing/error occurred.

    and thats not all. even after updation, i am not able to run this code posted by Moeur. please see the entire thread and you will see that the project posted by worked on Moeur's PC and not mine (even after updation).

    it's driving me nuts!!
    Show Appreciation. Rate Posts.

  27. #27

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    my request to you both, *SLAP ME*.

    you are right JA. now all i want to learn is, how to make it look like a normal Browse for folder Dialog box (starting from desktop to all drives etc).

    -icons can be set using imagelist.
    -folders can be added using .Nodes.Add method.

    thank you.
    Show Appreciation. Rate Posts.

  28. #28

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    hey just tried the example posted by krtxmrtz. it demonstrates the same thing, Add New folder using SHBrowseForFolder API on Win 98 too . How??
    Show Appreciation. Rate Posts.

  29. #29
    Fanatic Member vbasicgirl's Avatar
    Join Date
    Jan 2004
    Location
    Manchester, UK
    Posts
    1,016

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    This is another way but i am not sure about win98
    VB Code:
    1. Dim sh As New Shell32.Shell
    2. Dim str1 As Shell32.Folder2
    3.  
    4. Set str1 = sh.BrowseForFolder(Me.hWnd, "Select a Folder", 0, ssfDRIVES)
    5.  
    6. If Not str1 Is Nothing Then
    7.  MsgBox str1.Self.Path
    8. End If

    casey.

  30. #30
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Did you try Casey's code example?

    Have you sorta, kinda, got it working? (That is what I'm picking up anyway )

  31. #31

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Hack
    Did you try Casey's code example?
    which Casey's code??
    Have you sorta, kinda, got it working? (That is what I'm picking up anyway )
    yep it was my mistake.

    but now, only one query left, how can i make it look like normal Browse for folder dialog box? mean how can i start it from Desktop and also show all the drives of the PC?

    i can manage other things like Imagelist thing, and adding folders etc. though i may take a lot of time on it because i never did any work on these 2 (imagelist and treeview), but i want to do it myself.

    but if you or somebody else may help me out regarding the display of all drives and starting from desktop thing.

    thank you all.
    Show Appreciation. Rate Posts.

  32. #32
    Fanatic Member vbasicgirl's Avatar
    Join Date
    Jan 2004
    Location
    Manchester, UK
    Posts
    1,016

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Harsh Gupta
    which Casey's code??
    Post #29

    casey.

  33. #33

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by vbasicgirl
    Post #29

    casey.
    oh so sorry, i could not see your name there. i apologize.

    but i think i need to add reference for it because it generates an error for
    VB Code:
    1. Dim sh As New Shell32.Shell
    2. Dim str1 As Shell32.Folder2
    if you can please tell me as i am not able to recall it.

    thank you.
    Show Appreciation. Rate Posts.

  34. #34
    Fanatic Member vbasicgirl's Avatar
    Join Date
    Jan 2004
    Location
    Manchester, UK
    Posts
    1,016

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    I should have said, sorry. The reference is Microsoft shell controls and automation.

    casey.

  35. #35
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by Harsh Gupta
    oh so sorry, i could not see your name there. i apologize.

    but i think i need to add reference for it because it generates an error for
    VB Code:
    1. Dim sh As New Shell32.Shell
    2. Dim str1 As Shell32.Folder2
    if you can please tell me as i am not able to recall it.

    thank you.
    This is it.
    Attached Images Attached Images  
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  36. #36

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    i tried running your code and it's generating an error "Object doesn't support this property or method" at the MsgBox line.
    Show Appreciation. Rate Posts.

  37. #37
    Fanatic Member vbasicgirl's Avatar
    Join Date
    Jan 2004
    Location
    Manchester, UK
    Posts
    1,016

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Maybe its a 98 thing, did you copy and paste the code ?, if you did try typing it out to see if the property or method is there and if not is there an alternative to grab the path.

    casey.

  38. #38

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by vbasicgirl
    Maybe its a 98 thing, did you copy and paste the code ?, if you did try typing it out to see if the property or method is there and if not is there an alternative to grab the path.

    casey.
    actually i changed your code a little bit. i changed "Shell32.Folder2" to "Shell32.Folder" because if i use "Shell32.Folder2" then on clicking "yes" on dialog box it returns an error 13 : "type mismatch" and highlights
    VB Code:
    1. Set str1 = sh.BrowseForFolder(Me.hWnd, "Select a Folder", 0, ssfDRIVES)
    and if i use ".Folder" tehn .Self thing is not available.

    EDIT: was that code running on your machine??
    Last edited by Harsh Gupta; Jan 1st, 2006 at 01:24 PM.
    Show Appreciation. Rate Posts.

  39. #39
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    try out karl e stevensons home page he's got loads of codes .may be it can help you k.e.s

  40. #40

    Thread Starter
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: "Add New Folder" button in "Folder Browser" for Win 98

    Quote Originally Posted by litlewiki
    try out karl e stevensons home page he's got loads of codes .may be it can help you k.e.s
    litlewiki,

    he is Karl E. Peterson and not Stevenson. and sorry, i couldnot find any such utility there. but probably take a much better and deeper look at the link later. thank you anyways.
    Show Appreciation. Rate Posts.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width