Disable Make New Folder Button
Hi,
I have created a Browse Folder Dialog Box using Shell 32 in VB.Net 2002. But I want the 'Make New Folder' Button to be disabled or not seen. How is this possible? The code is here:
Dim oFolder As Shell32.Folder
Dim oShell As Shell32.Shell = New Shell32.Shell()
oFolder = oShell.BrowseForFolder(0, "Select a Folder:", 0, "C:\")
Thanks
[388 byte] By [
shers] at [2007-11-20 0:38:52]

# 1 Re: Disable Make New Folder Button
Hannes shers! :wave:
Isn't there a FolderBrowserDialog componenet in your toolbox
Is there a specific reason you have to use the Shell32
With the FolderBrowserDialog, you could simply something like :
FolderBrowserDialog1.ShowNewFolderButton = False to not show the New button.
# 3 Re: Disable Make New Folder Button
Ok, if that's the case you're going to need something like:
Dim oFolder As Shell32.Folder
Dim oShell As Shell32.Shell = New Shell32.Shell()
oFolder = oShell.BrowseForFolder(0, "Select a Folder:", 0, "C:\", BIF_NONEWFOLDERBUTTON) If I remember correctly. Also haue a look at the BROWSEINFO structure on MSDN.
Hope it helps!
# 4 Re: Disable Make New Folder Button
Thanks Hannes. I solved it. It's like
oFolder = oShell.BrowseForFolder(0, "Select a Folder:", &H200, "C:\")
where BIF_NONEWFOLDERBUTTON=&H200
Thanks
shers at 2007-11-10 3:15:49 >
