The demo has poor implementation of the common control APIs.
For the browse code, delete the line in ShowFolders:
bi.pidlRoot = SHSimpleIDListFromPath(mInitDir)
.... and try now. And BTW, the enum constant for Folder_INCLUDEFILES should
be &H4000, not &H4001. And the .uiflags Or test in ShowFolders should also
be tweaked to read &H4000 rather than &4001.
Since the demo has problems (the browse and other calls on that demo that
fail on vista) you should review
http://vbnet.mvps.org/code/browse/browseadv.htm to see how to properly
implement code to restrict the scope of the browse dialog.
--
Randy Birch
MS MVP, Visual Basic
http://vbnet.mvps.org/
"will_456" <wi;EMAIL REMOVED> wrote in message
news:F5SFh.5899$EMAIL REMOVED...
Sorry it's the Browse for folder dialog not Find Files ie. Public Function
ShowFolder
"Randy Birch" <EMAIL REMOVED> wrote in message
news:45e79e2b$0$32423$EMAIL REMOVED...
> That demo works perfectly on Vista. the Find Files button opens a window
> that says "to begin, type in the search box".
>
> --
>
>
> Randy Birch
> MS MVP, Visual Basic
> http://vbnet.mvps.org/
>
>
> "will_456" <wi;EMAIL REMOVED> wrote in message
> news:QfvFh.5359$EMAIL REMOVED...
>
> "Dean Earley" <EMAIL REMOVED> wrote in message
> news:45e56abc$0$28970$EMAIL REMOVED...
>> will_456 wrote:
>>> I have been using the CDlgEx cl*** in my programs for many years.
>>> http://www.freevbcode.com/ShowCode.Asp?ID=631
>>>
>>> This includes functions for displaying most available Windows dialogs,
>>> including those commonly called from VB (e.g., File Open, File Save,
>>> Print) and those less commonly called (e.g., the system's Find All Files
>>> Dialog).
>>>
>>>
>>> Trouble is the Find folder dialog no longer functions under Windows
>>> Vista. You get a window full of foreign characters.
>>> Is there a better version or update that works with Vista?
>>
>> Can you try padding the DialogPrompt property to 255 characters with null
>> characters?
>>
>> Prompt = Prompt & String(255 - Len(Prompt), vbNullChar)
>>
>> I have seen this dialog "break" on all versions of windows when the
>> prompt
>> is shorter than that.
>>
>> --
>> Dean Earley (EMAIL REMOVED)
>> i-Catcher Development Team
>>
>> iCode Systems
>
> I tried this but it still comes up with a scramble.
> Could someone please copy the code from this page into a blank project and
> run it. I can't get it to work with Windows Vist at all.
>
> http://www.freevbcode.com/ShowCode.Asp?ID=631
>
>