SysTreeView32 or something to retrieve full MyComputer and Network Tree? 
Author Message
 SysTreeView32 or something to retrieve full MyComputer and Network Tree?

Thank you for your help but this is not quite what I want.
I don't want a Dialog to apear in front of my forms. I want a control that
I can place on my form and show a directory or drive content as the user
navigates the Tree.
Thanks anyway.
--
_____________________
JOEL PAULA
"why he did not crane out to see
what lay beneath was perhaps because
the window was not made to open
or because he could or would not open it."
- Samuel Beckett - "stirrings still"



Quote:
> Joel,

> You need to access the SHBrowseForFolder function located in the
> Shell32.DLL.  This was demonstrated in the March (I think) issue of VBPJ.
> I have included the code as I typed it in from that article.  I want to
> again state that the origins of this code is in the Q&A section of VBPJ.

> Enough of that, Here it is...
[snip]
> For more tips, check out my web site at http://www.*-*-*.com/ ~improg

> Good Luck

> --
> Thomas Harper

> Spam makes me STUTTER.
> Clean up the extra letters in the address above
> to E-Mail me



> > I am searching for a way to get the SysTreeview32 like in explorer. If
> > could only find a way to get the full directory tree under My Computer
> and
> > Network Neighbourhood, I would make the TreeView myself.

> > If anybody can shade some light, please I would apreciate.
> > By the way... I am using Visual Basic 5.
> > Thanks for any help.

> > --
> > _____________________
> > JOEL PAULA
> > "why he did not crane out to see
> > what lay beneath was perhaps because
> > the window was not made to open
> > or because he could or would not open it."
> > - Samuel Beckett - "stirrings still"



Sat, 30 Oct 1999 03:00:00 GMT  
 SysTreeView32 or something to retrieve full MyComputer and Network Tree?

--------------6BB806962FF333F739658C6D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Can someone publish the Type "BrowseInfo" which belongs to the sample
below ?
(Public Declare Function SHBrowseForFolder Lib "shell32.dll" (lpbi As
BrowseInfo) As Long)
I couldn't find it in the API-Definitions

Thanks a lot
Stefan

Quote:

> Joel,

> You need to access the SHBrowseForFolder function located in the
> Shell32.DLL.  This was demonstrated in the March (I think) issue of
> VBPJ.
> I have included the code as I typed it in from that article.  I want
> to
> again state that the origins of this code is in the Q&A section of
> VBPJ.

> Enough of that, Here it is...

> '========================================================
> '  First this code should be placed in a Module
> '========================================================
> ' Public API Declares
> Public Declare Sub CoTaskMemFree Lib "ole32.dll" (ByVal hMem As Long)
> Public Declare Function SHBrowseForFolder Lib "shell32.dll" (lpbi As
> BrowseInfo) As Long
> Public Declare Function SHGetPathFromIDList Lib "shell32.dll" (ByVal
> pidList As Long, ByVal lpBuffer As String) As Long

> 'Public Interface
> Public Function BrowseForFolder(ByVal hWndOwner As Long, ByVal sPrompt
> As
> String) As String
>     Dim iNull As Integer
>     Dim lpIDList As Long
>     Dim lResult As Long
>     Dim sPath As String
>     Dim udtBI As BrowseInfo

>     With udtBI
>         .hWndOwner = hWndOwner
>         .lpszTitle = sPrompt
>         .ulFlags = BIF_RETURNONLYFSDIRS
>     End With

>     lpIDList = SHBrowseForFolder(udtBI)
>     If lpIDList Then
>         sPath = Space$(MAX_PATH)
>         lResult = SHGetPathFromIDList(lpIDList, sPath)
>         Call CoTaskMemFree(lpIDList)
>         iNull = InStr(sPath, vbNullChar)
>         If iNull Then
>             sPath = Left$(sPath, iNull - 1)
>         End If
>     End If
>     BrowseForFolder = sPath
> End Function

> '========================================================
> '  To test the preceding code place a command button and a text box on
> the
> '  Startup form and add the following code to the Forms code module
> '========================================================
> Private Sub Command1_Click()
>     Text1.Text = BrowseForFolder(Me.hWnd, "Choose a directory")
> End Sub

> For more tips, check out my web site at http://home.fia.net/~improg

> Good Luck

> --
> Thomas Harper

> Spam makes me STUTTER.
> Clean up the extra letters in the address above
> to E-Mail me



> > I am searching for a way to get the SysTreeview32 like in explorer.
> If
> > could only find a way to get the full directory tree under My
> Computer
> and
> > Network Neighbourhood, I would make the TreeView myself.

> > If anybody can shade some light, please I would apreciate.
> > By the way... I am using Visual Basic 5.
> > Thanks for any help.

> > --
> > _____________________
> > JOEL PAULA
> > "why he did not crane out to see
> > what lay beneath was perhaps because
> > the window was not made to open
> > or because he could or would not open it."
> > - Samuel Beckett - "stirrings still"

--------------6BB806962FF333F739658C6D
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
Can someone publish the Type "BrowseInfo" which belongs to the sample below
?
<BR>(Public Declare Function SHBrowseForFolder Lib "shell32.dll" (lpbi
As BrowseInfo) As Long)
<BR>I couldn't find it in the API-Definitions

<P>Thanks a lot
<BR>Stefan
<BR>

<BLOCKQUOTE TYPE=CITE>Joel,

<P>You need to access the SHBrowseForFolder function located in the
<BR>Shell32.DLL.&nbsp; This was demonstrated in the March (I think) issue
of VBPJ.
<BR>I have included the code as I typed it in from that article.&nbsp;
I want to
<BR>again state that the origins of this code is in the Q&amp;A section
of VBPJ.

<P>Enough of that, Here it is...

<P>'========================================================
<BR>'&nbsp; First this code should be placed in a Module
<BR>'========================================================
<BR>' Public API Declares
<BR>Public Declare Sub CoTaskMemFree Lib "ole32.dll" (ByVal hMem As Long)
<BR>Public Declare Function SHBrowseForFolder Lib "shell32.dll" (lpbi As
<BR>BrowseInfo) As Long
<BR>Public Declare Function SHGetPathFromIDList Lib "shell32.dll" (ByVal
<BR>pidList As Long, ByVal lpBuffer As String) As Long

<P>'Public Interface
<BR>Public Function BrowseForFolder(ByVal hWndOwner As Long, ByVal sPrompt
As
<BR>String) As String
<BR>&nbsp;&nbsp;&nbsp; Dim iNull As Integer
<BR>&nbsp;&nbsp;&nbsp; Dim lpIDList As Long
<BR>&nbsp;&nbsp;&nbsp; Dim lResult As Long
<BR>&nbsp;&nbsp;&nbsp; Dim sPath As String
<BR>&nbsp;&nbsp;&nbsp; Dim udtBI As BrowseInfo

<P>&nbsp;&nbsp;&nbsp; With udtBI
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .hWndOwner = hWndOwner
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .lpszTitle = sPrompt
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ulFlags = BIF_RETURNONLYFSDIRS
<BR>&nbsp;&nbsp;&nbsp; End With

<P>&nbsp;&nbsp;&nbsp; lpIDList = SHBrowseForFolder(udtBI)
<BR>&nbsp;&nbsp;&nbsp; If lpIDList Then
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sPath = Space$(MAX_PATH)
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lResult = SHGetPathFromIDList(lpIDList,
sPath)
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call CoTaskMemFree(lpIDList)
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iNull = InStr(sPath, vbNullChar)
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If iNull Then
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sPath = Left$(sPath, iNull - 1)
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If
<BR>&nbsp;&nbsp;&nbsp; End If
<BR>&nbsp;&nbsp;&nbsp; BrowseForFolder = sPath
<BR>End Function

<P>'========================================================
<BR>'&nbsp; To test the preceding code place a command button and a text
box on the
<BR>'&nbsp; Startup form and add the following code to the Forms code module
<BR>'========================================================
<BR>Private Sub Command1_Click()
<BR>&nbsp;&nbsp;&nbsp; Text1.Text = BrowseForFolder(Me.hWnd, "Choose a
directory")
<BR>End Sub

<P>For more tips, check out my web site at <A HREF="http://home.fia.net/~improg">http://home.fia.net/~improg</A>

<P>Good Luck

<P>--
<BR>Thomas Harper

<BR>Spam makes me STUTTER.
<BR>Clean up the extra letters in the address above
<BR>to E-Mail me



<BR>> I am searching for a way to get the SysTreeview32 like in explorer.
If
<BR>> could only find a way to get the full directory tree under My Computer
<BR>and
<BR>> Network Neighbourhood, I would make the TreeView myself.
<BR>>
<BR>> If anybody can shade some light, please I would apreciate.
<BR>> By the way... I am using Visual Basic 5.
<BR>> Thanks for any help.
<BR>>
<BR>> --
<BR>> _____________________
<BR>> JOEL PAULA
<BR>> "why he did not crane out to see
<BR>> what lay beneath was perhaps because
<BR>> the window was not made to open
<BR>> or because he could or would not open it."
<BR>> - Samuel Beckett - "stirrings still"
<BR>></BLOCKQUOTE>
&nbsp;</HTML>

--------------6BB806962FF333F739658C6D--



Sat, 30 Oct 1999 03:00:00 GMT  
 SysTreeView32 or something to retrieve full MyComputer and Network Tree?

I am searching for a way to get the SysTreeview32 like in explorer. If
could only find a way to get the full directory tree under My Computer and
Network Neighbourhood, I would make the TreeView myself.

If anybody can shade some light, please I would apreciate.
By the way... I am using Visual Basic 5.
Thanks for any help.

--
_____________________
JOEL PAULA
"why he did not crane out to see
what lay beneath was perhaps because
the window was not made to open
or because he could or would not open it."
- Samuel Beckett - "stirrings still"



Sat, 30 Oct 1999 03:00:00 GMT  
 SysTreeView32 or something to retrieve full MyComputer and Network Tree?

Quote:

> Can someone publish the Type "BrowseInfo" which belongs to the sample
> below ?
> (Public Declare Function SHBrowseForFolder Lib "shell32.dll" (lpbi As
> BrowseInfo) As Long)
> I couldn't find it in the API-Definitions

> Thanks a lot
> Stefan

Here ya go:

Public Type BROWSEINFO
    hOwner As Long
    pidlRoot As Long
    pszDisplayName As String
    lpszTitle As String
    ulFlags As Long
    lpfn As Long
    lParam As Long
    iImage As Long
End Type

HTH
Bob



Sat, 30 Oct 1999 03:00:00 GMT  
 SysTreeView32 or something to retrieve full MyComputer and Network Tree?


GMT):

Quote:
>I don't want a Dialog to apear in front of my forms. I want a control that
>I can place on my form and show a directory or drive content as the user
>navigates the Tree.

Why not use the treeview then? You will need to code its
contents anyway, no way to do this automatically (yet) if
not some brain created a control for it yet. But as coding
it is not too tough I'd say a control for this would be a
loss of memory for the user's machine.

It's astounding to see how far one can crosspost...

Mathias Schiffer, Germany
-----------------------------------------------
VB-FAQ: http://home.sol.no/jansh/vb/default.htm
NG-tips: http://www.rat.de/metty/vbnews



Sun, 31 Oct 1999 03:00:00 GMT  
 SysTreeView32 or something to retrieve full MyComputer and Network Tree?

Check out http:\\www.infoseek.com\activex

I think this is more in-line with what you are asking for; only you want
something that maps out the local system hierarchy as well.  Since I
developed the control referenced above; I am open to feedback and
enhancements that may be appliable. Local network/system tree population
along with the proposed .SMP[Sitemap] are deffinately on my list.

If I find any other tools similar to what you are requesting; I'll post the
results here.

-W

---------------------------------------------------------------------

Senior Software Engineer  -  Advanced Development
InfoSeek Corporation            Phone: 408/567-2940
2620 Augustine Dr #250          Fax: 408/986-1889
Santa Clara, CA 95054           URL: http://www.infoseek.com/
---------------------------------------------------------------------


Quote:

>GMT):

>>I don't want a Dialog to apear in front of my forms. I want a control
that
>>I can place on my form and show a directory or drive content as the user
>>navigates the Tree.

>Why not use the treeview then? You will need to code its
>contents anyway, no way to do this automatically (yet) if
>not some brain created a control for it yet. But as coding
>it is not too tough I'd say a control for this would be a
>loss of memory for the user's machine.

>It's astounding to see how far one can crosspost...

>Mathias Schiffer, Germany
>-----------------------------------------------
>VB-FAQ: http://home.sol.no/jansh/vb/default.htm
>NG-tips: http://www.rat.de/metty/vbnews



Sun, 31 Oct 1999 03:00:00 GMT  
 SysTreeView32 or something to retrieve full MyComputer and Network Tree?


GMT):

Quote:
>P.S.: I don't see whats the problem of crossposting to 6 diferent
>Newsgroups as long as they are *directly* related to my subject.

microsoft.public.vb.winapi.graphics and
microsoft.public.win32.programmer.gdi

are "*directly* related" to your subject?

Mathias Schiffer, Germany
-----------------------------------------------
VB-FAQ: http://home.sol.no/jansh/vb/default.htm
NG-tips: http://www.rat.de/metty/vbnews



Mon, 01 Nov 1999 03:00:00 GMT  
 SysTreeView32 or something to retrieve full MyComputer and Network Tree?



Quote:

> GMT):

> >P.S.: I don't see whats the problem of crossposting to 6 diferent
> >Newsgroups as long as they are *directly* related to my subject.

> microsoft.public.vb.winapi.graphics and
> microsoft.public.win32.programmer.gdi

> are "*directly* related" to your subject?

Yes it is. If I want to get the icons for each of the items in the treeview
and draw the in there.
--
_____________________
JOEL PAULA
"why he did not crane out to see
what lay beneath was perhaps because
the window was not made to open
or because he could or would not open it."
- Samuel Beckett - "stirrings still"


Tue, 02 Nov 1999 03:00:00 GMT  
 SysTreeView32 or something to retrieve full MyComputer and Network Tree?

I'll try that. Thanks a lot for your usefull information.
--
_____________________
JOEL PAULA
"why he did not crane out to see
what lay beneath was perhaps because
the window was not made to open
or because he could or would not open it."
- Samuel Beckett - "stirrings still"



Quote:
> On Tue, 13 May 1997 02:55:03 -0700, "Joel Paula"

> >I don't want a Dialog to apear in front of my forms. I want a control
that
> >I can place on my form and show a directory or drive content as the user
> >navigates the Tree.

> Bind to the desktop folder (or CSIDL_DRIVES folder or
> CSIDL_NETHOOD folder), and use EnumObjects to enumerate the
> objects within it.  Use BindToObject to "cd" into subobjects.

> --
> (My return address is intentionally invalid to foil spammers.  Delete the
> ".---" to get my real address.  I do this on my own time with my own
money;
> my responses are not to be considered official technical support or
advice.)



Tue, 02 Nov 1999 03:00:00 GMT  
 SysTreeView32 or something to retrieve full MyComputer and Network Tree?

On Tue, 13 May 1997 02:55:03 -0700, "Joel Paula"

Quote:

>I don't want a Dialog to apear in front of my forms. I want a control that
>I can place on my form and show a directory or drive content as the user
>navigates the Tree.

Bind to the desktop folder (or CSIDL_DRIVES folder or
CSIDL_NETHOOD folder), and use EnumObjects to enumerate the
objects within it.  Use BindToObject to "cd" into subobjects.

--
(My return address is intentionally invalid to foil spammers.  Delete the
".---" to get my real address.  I do this on my own time with my own money;
my responses are not to be considered official technical support or advice.)



Tue, 02 Nov 1999 03:00:00 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. SysTreeView32 or something to retrieve full MyComputer and Network Tree?

2. SysTreeView32 or something to retrieve full MyComputer and Network Tree?

3. SysTreeView32 or something to retrieve full MyComputer and Network Tree?

4. Explorer - Adding extra objects (Drives, printers etc) to the Mycomputer Tree

5. Retrieving Full Network Name

6. Retrieving Full Database Path Name

7. Retrieving Full path and Filename vs Open Dialog Box

8. Retrieving Full Path Name

9. Retrieving the full path to a COM addin

10. Need API call to retrieve full path in Win95

11. retrieving filesystem folder tree contents as xml

12. SysTreeView32 with background-image

 

 
Powered by phpBB® Forum Software