SHBrowseForFolder API call - HOW?? 
Author Message
 SHBrowseForFolder API call - HOW??

Does anyone have an idea how to use the SHBrowseForFolder API from VB 5, on
a NT 4.0 WS.

 I need to be able to browse (as in the browse button of "Find File") for
folders across my local drives, or the Network.

If a control exists that can do a similar thing, that would also be OK.

Any help is appreciated.

Thanks

Ade



Sat, 29 Apr 2000 03:00:00 GMT  
 SHBrowseForFolder API call - HOW??

This attached is a sample of BrowseForFolder. If you want a very powerful
(yet free) Activex Control, check the website in my signature for Brad
Martinez' BrowseForFolder control.

--
Check Common Controls Replacement Projects ActiveX controls at:
http://www.zeode-sd.com/ccrp/
Domenico Statuto



Quote:
> Does anyone have an idea how to use the SHBrowseForFolder API from VB 5,
on
> a NT 4.0 WS.

>  I need to be able to browse (as in the browse button of "Find File") for
> folders across my local drives, or the Network.

> If a control exists that can do a similar thing, that would also be OK.

> Any help is appreciated.

> Thanks

> Ade

begin 600 BrowseFolder.zip
<encoded_portion_removed>
end


Sat, 29 Apr 2000 03:00:00 GMT  
 SHBrowseForFolder API call - HOW??

Take a look at the Browse Dialog control at the Common Controls Replacement
Project (CCRP) homepage. The address is in my signature.
--
Ben Baird, MVP
Microsoft SiteBuilder Network Level 2
Visual Basic Thunder, version 2.0
http://www.{*filter*}highway.com/~psy/
Common Controls Replacement Project, Official Member
http://www.*-*-*.com/

Quote:

>Does anyone have an idea how to use the SHBrowseForFolder API from VB 5, on
>a NT 4.0 WS.

> I need to be able to browse (as in the browse button of "Find File") for
>folders across my local drives, or the Network.

>If a control exists that can do a similar thing, that would also be OK.



Sat, 29 Apr 2000 03:00:00 GMT  
 SHBrowseForFolder API call - HOW??

Quote:

>This attached is a sample of BrowseForFolder. If you want a very powerful
>(yet free) Activex Control, check the website in my signature for Brad
>Martinez' BrowseForFolder control.

  <SNIP>

Thanks guys, the sample is great, and so is the control.  Using the sample,
how would I set the root folder (or starting folder) of the browse?

TIA

Ade



Sun, 30 Apr 2000 03:00:00 GMT  
 SHBrowseForFolder API call - HOW??

You should set the pidl field of the Browseinfo structure, but I can't help
you, sorry. Iwill forward your request to Brad Martinez.

--
Check Common Controls Replacement Projects ActiveX controls at:
http://www.zeode-sd.com/ccrp/
Domenico Statuto



Quote:




Quote:
> >This attached is a sample of BrowseForFolder. If you want a very
powerful
> >(yet free) Activex Control, check the website in my signature for Brad
> >Martinez' BrowseForFolder control.

>   <SNIP>

> Thanks guys, the sample is great, and so is the control.  Using the
sample,
> how would I set the root folder (or starting folder) of the browse?

> TIA

> Ade



Sun, 30 Apr 2000 03:00:00 GMT  
 SHBrowseForFolder API call - HOW??

The RootFolder prop will set a chosen dir as the root (i.e. it's not
possible to browse folders 'above' that), while the SelectedFolder prop set
the folder initially selected when the dialog is displayed.

--
Check Common Controls Replacement Projects ActiveX controls at:
http://www.zeode-sd.com/ccrp/
Domenico Statuto



Quote:




Quote:
> >This attached is a sample of BrowseForFolder. If you want a very
powerful
> >(yet free) Activex Control, check the website in my signature for Brad
> >Martinez' BrowseForFolder control.

>   <SNIP>

> Thanks guys, the sample is great, and so is the control.  Using the
sample,
> how would I set the root folder (or starting folder) of the browse?

> TIA

> Ade



Sun, 30 Apr 2000 03:00:00 GMT  
 SHBrowseForFolder API call - HOW??

Adrian,

Quote:
> Thanks guys, the sample is great, and so is the control.  Using the sample,
> how would I set the root folder (or starting folder) of the browse?

Have to set the pidlRoot member of the BROWSEINFO struct. For
special shell folders (My Computer, Start Menu, etc.) you can use
the SHGetSpecialFolderLocation API to get the folder's pidl (pointer
to an item id list). I didn't see what Domenico sent, but I show how
to do this in the BrowseDlg demo on my site.

To obtain the pidl for a "non special" file system folder, there are a
couple of choices. The hard and correct way to do this is to encapsulate
the IShellFolder interface and call it's ParseDisplayName member
function. The EnumDeskVB example on my site also shows how to
do this.

The easy and not guaranteed to always work way is to use the
undocumented SHSimpleIDListFromPath Shell32.dll function. Here's
the declare:

Declare Function SHSimpleIDListFromPath Lib "shell32" Alias "#162" _
                           (ByVal szPath As String) As Long

Some things to consider about this function: First the function is
exported at the specified ordinal in both Win95's and IE4's version
of Shell32.dll (versions 4.00.950(1) and 4.71 respectively) but there
is nothing that says it will be at this ordinal or available at all in future
versions of the library. Secondly, szPath must be specified as an
ANSII string in Win95, and as a Unicode string when called on WinNT.
Finally the function's name is misleading. This may not make much
sense, but the function returns an absolute pidl (or "complex" pidl, as
opposed to "simple"), relative to the desktop folder. See the SDK to
learn more on pidls.

It's your call... Oh, and thank you too. Domenico as well.

--
Brad Martinez
http://members.aol.com/btmtz/vb

Common Controls Replacement Project
http://www.zeode-sd.com/ccrp/



Sun, 30 Apr 2000 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. SHBrowseForFolder api call

2. Using the SHBrowseforFolder API call

3. SHBrowseForFolder API call - HOW??

4. SHBrowseForFolder API call.

5. SHBrowseForFolder call from Access97

6. SHBrowseForFolder API

7. SHBrowseForFolder API

8. SHBrowseForFolder api

9. SHBrowseForFolder API

10. SHBrowseForFolder API & hWnd

11. SHBrowseForFolder() API Function

12. SHBrowseForFolder API: Is it available in VB5?

 

 
Powered by phpBB® Forum Software