Home All Groups Group Topic Archive Search About

FolderBrowserDialog hangs in 2005

Author
17 Jun 2006 7:53 PM
Grumpy Aero Guy
I have created an app that makes use of the FolderBrowserDialog.

Upon building the app, installing and running it, and invoking the form
using the dialog, it hangs upon folder selection and goes "not responding"

Upon debugging, it hangs as well upon executing the line that extracts the
selected folder without further explanation. All looks well in the debugger
prior to executing the line marked with <<<<<<  below. When I step over that
line, it hangs.

With FolderBrowserDialog1
..RootFolder = Environment.SpecialFolder.Desktop

..SelectedPath = Environment.SpecialFolder.Desktop

..Description = "Please select the desired template(s)..."

If .ShowDialog = DialogResult.Cancel Then

Exit Sub

End If

If .ShowDialog = DialogResult.OK Then

DestinationPath = .SelectedPath    <<<<<<<<

End If

End With


I noticed the same behavior from a downloaded exe created in VS2005 using
the folderbrowser --- thus, I have two indenpent instances of the
browserdialog hanging, one not of my creation.

Any insights?

--
Grumpy Aero Guy

Author
17 Jun 2006 8:08 PM
Meelis
why you call .ShowDialog twice?

i suggest something like this;

Dim dlResult As DialogResult

dlResult = .ShowDialog

If dlResult = Windows.Forms.DialogResult.Cancel Then
    Exit Sub
ElseIf dlResult = Windows.Forms.DialogResult.Ok Then
   DestinationPath = .SelectedPath
End If


Meelis




Show quoteHide quote
"Grumpy Aero Guy" <f*@beerme.org> wrote in message
news:k5Zkg.71417$P2.7652@tornado.ohiordc.rr.com...
> I have created an app that makes use of the FolderBrowserDialog.
>
> Upon building the app, installing and running it, and invoking the form
> using the dialog, it hangs upon folder selection and goes "not responding"
>
> Upon debugging, it hangs as well upon executing the line that extracts the
> selected folder without further explanation. All looks well in the
debugger
> prior to executing the line marked with <<<<<<  below. When I step over
that
> line, it hangs.
>
> With FolderBrowserDialog1
> .RootFolder = Environment.SpecialFolder.Desktop
>
> .SelectedPath = Environment.SpecialFolder.Desktop
>
> .Description = "Please select the desired template(s)..."
>
> If .ShowDialog = DialogResult.Cancel Then
>
> Exit Sub
>
> End If
>
> If .ShowDialog = DialogResult.OK Then
>
> DestinationPath = .SelectedPath    <<<<<<<<
>
> End If
>
> End With
>
>
> I noticed the same behavior from a downloaded exe created in VS2005 using
> the folderbrowser --- thus, I have two indenpent instances of the
> browserdialog hanging, one not of my creation.
>
> Any insights?
>
> --
> Grumpy Aero Guy
>
>
>
>
Author
18 Jun 2006 2:35 AM
Grumpy Aero Guy
Fair enough....

BUT, I still hang on the DestinationPath = .SelectedPath line.

--
Grumpy Aero Guy



Show quoteHide quote
"Meelis" <m**@hot.ee> wrote in message
news:uYp7AnkkGHA.4104@TK2MSFTNGP04.phx.gbl...
> why you call .ShowDialog twice?
>
> i suggest something like this;
>
> Dim dlResult As DialogResult
>
> dlResult = .ShowDialog
>
> If dlResult = Windows.Forms.DialogResult.Cancel Then
>    Exit Sub
> ElseIf dlResult = Windows.Forms.DialogResult.Ok Then
>   DestinationPath = .SelectedPath
> End If
>
>
> Meelis
>
>
>
>
> "Grumpy Aero Guy" <f*@beerme.org> wrote in message
> news:k5Zkg.71417$P2.7652@tornado.ohiordc.rr.com...
>> I have created an app that makes use of the FolderBrowserDialog.
>>
>> Upon building the app, installing and running it, and invoking the form
>> using the dialog, it hangs upon folder selection and goes "not
>> responding"
>>
>> Upon debugging, it hangs as well upon executing the line that extracts
>> the
>> selected folder without further explanation. All looks well in the
> debugger
>> prior to executing the line marked with <<<<<<  below. When I step over
> that
>> line, it hangs.
>>
>> With FolderBrowserDialog1
>> .RootFolder = Environment.SpecialFolder.Desktop
>>
>> .SelectedPath = Environment.SpecialFolder.Desktop
>>
>> .Description = "Please select the desired template(s)..."
>>
>> If .ShowDialog = DialogResult.Cancel Then
>>
>> Exit Sub
>>
>> End If
>>
>> If .ShowDialog = DialogResult.OK Then
>>
>> DestinationPath = .SelectedPath    <<<<<<<<
>>
>> End If
>>
>> End With
>>
>>
>> I noticed the same behavior from a downloaded exe created in VS2005 using
>> the folderbrowser --- thus, I have two indenpent instances of the
>> browserdialog hanging, one not of my creation.
>>
>> Any insights?
>>
>> --
>> Grumpy Aero Guy
>>
>>
>>
>>
>
>
Author
18 Jun 2006 6:45 AM
Meelis
Hi
Is DestinaionPath a variable, function or property?

Meelis




Show quoteHide quote
"Grumpy Aero Guy" <f*@beerme.org> wrote in message
news:RZ2lg.61315$mh.1584@tornado.ohiordc.rr.com...
> Fair enough....
>
> BUT, I still hang on the DestinationPath = .SelectedPath line.
>
> --
> Grumpy Aero Guy
>
>
>
> "Meelis" <m**@hot.ee> wrote in message
> news:uYp7AnkkGHA.4104@TK2MSFTNGP04.phx.gbl...
> > why you call .ShowDialog twice?
> >
> > i suggest something like this;
> >
> > Dim dlResult As DialogResult
> >
> > dlResult = .ShowDialog
> >
> > If dlResult = Windows.Forms.DialogResult.Cancel Then
> >    Exit Sub
> > ElseIf dlResult = Windows.Forms.DialogResult.Ok Then
> >   DestinationPath = .SelectedPath
> > End If
> >
> >
> > Meelis
> >
> >
> >
> >
> > "Grumpy Aero Guy" <f*@beerme.org> wrote in message
> > news:k5Zkg.71417$P2.7652@tornado.ohiordc.rr.com...
> >> I have created an app that makes use of the FolderBrowserDialog.
> >>
> >> Upon building the app, installing and running it, and invoking the form
> >> using the dialog, it hangs upon folder selection and goes "not
> >> responding"
> >>
> >> Upon debugging, it hangs as well upon executing the line that extracts
> >> the
> >> selected folder without further explanation. All looks well in the
> > debugger
> >> prior to executing the line marked with <<<<<<  below. When I step over
> > that
> >> line, it hangs.
> >>
> >> With FolderBrowserDialog1
> >> .RootFolder = Environment.SpecialFolder.Desktop
> >>
> >> .SelectedPath = Environment.SpecialFolder.Desktop
> >>
> >> .Description = "Please select the desired template(s)..."
> >>
> >> If .ShowDialog = DialogResult.Cancel Then
> >>
> >> Exit Sub
> >>
> >> End If
> >>
> >> If .ShowDialog = DialogResult.OK Then
> >>
> >> DestinationPath = .SelectedPath    <<<<<<<<
> >>
> >> End If
> >>
> >> End With
> >>
> >>
> >> I noticed the same behavior from a downloaded exe created in VS2005
using
> >> the folderbrowser --- thus, I have two indenpent instances of the
> >> browserdialog hanging, one not of my creation.
> >>
> >> Any insights?
> >>
> >> --
> >> Grumpy Aero Guy
> >>
> >>
> >>
> >>
> >
> >
>
>
Author
18 Jun 2006 1:28 PM
Grumpy Aero Guy
property of the control... that's what's baffling...

--
Grumpy Aero Guy



Show quoteHide quote
"Meelis" <m**@hot.ee> wrote in message
news:eE0j9KqkGHA.3848@TK2MSFTNGP04.phx.gbl...
> Hi
> Is DestinaionPath a variable, function or property?
>
> Meelis
>
>
>
>
> "Grumpy Aero Guy" <f*@beerme.org> wrote in message
> news:RZ2lg.61315$mh.1584@tornado.ohiordc.rr.com...
>> Fair enough....
>>
>> BUT, I still hang on the DestinationPath = .SelectedPath line.
>>
>> --
>> Grumpy Aero Guy
>>
>>
>>
>> "Meelis" <m**@hot.ee> wrote in message
>> news:uYp7AnkkGHA.4104@TK2MSFTNGP04.phx.gbl...
>> > why you call .ShowDialog twice?
>> >
>> > i suggest something like this;
>> >
>> > Dim dlResult As DialogResult
>> >
>> > dlResult = .ShowDialog
>> >
>> > If dlResult = Windows.Forms.DialogResult.Cancel Then
>> >    Exit Sub
>> > ElseIf dlResult = Windows.Forms.DialogResult.Ok Then
>> >   DestinationPath = .SelectedPath
>> > End If
>> >
>> >
>> > Meelis
>> >
>> >
>> >
>> >
>> > "Grumpy Aero Guy" <f*@beerme.org> wrote in message
>> > news:k5Zkg.71417$P2.7652@tornado.ohiordc.rr.com...
>> >> I have created an app that makes use of the FolderBrowserDialog.
>> >>
>> >> Upon building the app, installing and running it, and invoking the
>> >> form
>> >> using the dialog, it hangs upon folder selection and goes "not
>> >> responding"
>> >>
>> >> Upon debugging, it hangs as well upon executing the line that extracts
>> >> the
>> >> selected folder without further explanation. All looks well in the
>> > debugger
>> >> prior to executing the line marked with <<<<<<  below. When I step
>> >> over
>> > that
>> >> line, it hangs.
>> >>
>> >> With FolderBrowserDialog1
>> >> .RootFolder = Environment.SpecialFolder.Desktop
>> >>
>> >> .SelectedPath = Environment.SpecialFolder.Desktop
>> >>
>> >> .Description = "Please select the desired template(s)..."
>> >>
>> >> If .ShowDialog = DialogResult.Cancel Then
>> >>
>> >> Exit Sub
>> >>
>> >> End If
>> >>
>> >> If .ShowDialog = DialogResult.OK Then
>> >>
>> >> DestinationPath = .SelectedPath    <<<<<<<<
>> >>
>> >> End If
>> >>
>> >> End With
>> >>
>> >>
>> >> I noticed the same behavior from a downloaded exe created in VS2005
> using
>> >> the folderbrowser --- thus, I have two indenpent instances of the
>> >> browserdialog hanging, one not of my creation.
>> >>
>> >> Any insights?
>> >>
>> >> --
>> >> Grumpy Aero Guy
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>>
>>
>
>
Author
18 Jun 2006 7:40 PM
gene kelley
On Sun, 18 Jun 2006 13:28:12 GMT, "Grumpy Aero Guy" <f*@beerme.org>
wrote:

>property of the control... that's what's baffling...

No such property as DestinationPath for the FolderBrowserDialog

     Private Sub Button1_Click(ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles Button1.Click
        With FolderBrowserDialog1
            .RootFolder = Environment.SpecialFolder.Desktop
            .SelectedPath = Environment.SpecialFolder.Desktop.ToString
            .Description = "Please select the desired template(s)..."

            If .ShowDialog = Windows.Forms.DialogResult.OK Then
                Me.Label1.Text = .SelectedPath


            End If
        End With
    End Sub

Gene
Author
19 Jun 2006 2:44 AM
Grumpy Aero Guy
My Bad..

It is always hanging here... even in debugger:

Me.Label1.Text = .SelectedPath

It's the .selectedpath line that hangs

--
Grumpy Aero Guy



Show quoteHide quote
"gene kelley" <o***@by.me> wrote in message
news:dqab929k9b6p6m9iuclvh7ngkh3o3cu7ht@4ax.com...
> On Sun, 18 Jun 2006 13:28:12 GMT, "Grumpy Aero Guy" <f*@beerme.org>
> wrote:
>
>>property of the control... that's what's baffling...
>
> No such property as DestinationPath for the FolderBrowserDialog
>
>     Private Sub Button1_Click(ByVal sender As System.Object, _
>        ByVal e As System.EventArgs) Handles Button1.Click
>        With FolderBrowserDialog1
>            .RootFolder = Environment.SpecialFolder.Desktop
>            .SelectedPath = Environment.SpecialFolder.Desktop.ToString
>            .Description = "Please select the desired template(s)..."
>
>            If .ShowDialog = Windows.Forms.DialogResult.OK Then
>                Me.Label1.Text = .SelectedPath
>
>
>            End If
>        End With
>    End Sub
>
> Gene
Author
19 Jun 2006 3:46 AM
gene kelley
On Mon, 19 Jun 2006 02:44:16 GMT, "Grumpy Aero Guy" <f*@beerme.org>
wrote:

>My Bad..
>
>It is always hanging here... even in debugger:
>
>Me.Label1.Text = .SelectedPath
>
>It's the .selectedpath line that hangs


Start a new project.  Add a FolderBrowserDialog, Button and Label.
Copy the code for the Button1_Click event that I previously posted and
paste it to the button click event in the project.  Run the example. 

What results do you get?

Gene
Author
19 Jun 2006 11:53 AM
Grumpy Aero Guy
OK... did it ...

(except i used a textbox instead of a lable, which shouldn't matter...)

When I run the project from within VS2005, it works, although the dialog is
VERY sluggish.... takes a LONG time to navigate to "My Computer", acts as
though it'd deciding whether it wants to hang or physically work....

When I build the solution, and run the .exe in the "Release" folder, it
hangs upon selecting a folder in the dialog....

As I indicated before, I have downloaded a few exe s from CodeProject that
use folderbrowsers, and get the SAME hanging.....

Try the exe thing in the release folder several times. I would be curious if
you get a hang.

FWIW, I did a quick google on "folderbrowserdialog hans VS 2005" and get
quite a few "hits"... this one is interesting:

http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/d5d446ae9ae3b5af/51c4cb022010b082%2351c4cb022010b082

here's MY code:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

With FolderBrowserDialog1

..RootFolder = Environment.SpecialFolder.Desktop

..SelectedPath = Environment.SpecialFolder.Desktop.ToString

..Description = "Please select the desired template(s)..."

If .ShowDialog = Windows.Forms.DialogResult.OK Then

Me.TextBox1.Text = .SelectedPath



End If

End With

End Sub




--
Grumpy Aero Guy



Show quoteHide quote
"gene kelley" <o***@by.me> wrote in message
news:1m6c92ltsv17r85b6j33kc8vvmlfa6oopk@4ax.com...
> On Mon, 19 Jun 2006 02:44:16 GMT, "Grumpy Aero Guy" <f*@beerme.org>
> wrote:
>
>>My Bad..
>>
>>It is always hanging here... even in debugger:
>>
>>Me.Label1.Text = .SelectedPath
>>
>>It's the .selectedpath line that hangs
>
>
> Start a new project.  Add a FolderBrowserDialog, Button and Label.
> Copy the code for the Button1_Click event that I previously posted and
> paste it to the button click event in the project.  Run the example.
>
> What results do you get?
>
> Gene
Author
19 Jun 2006 12:00 PM
Grumpy Aero Guy
BTW, a re-boot gives you one shot at it working. Any second attempt, it
hangs. I get similiar behavior described via the link in the previous
e-mail.

--
Grumpy Aero Guy



Show quoteHide quote
"Grumpy Aero Guy" <f*@beerme.org> wrote in message
news:lfwlg.61881$mh.7285@tornado.ohiordc.rr.com...
> OK... did it ...
>
> (except i used a textbox instead of a lable, which shouldn't matter...)
>
> When I run the project from within VS2005, it works, although the dialog
> is VERY sluggish.... takes a LONG time to navigate to "My Computer", acts
> as though it'd deciding whether it wants to hang or physically work....
>
> When I build the solution, and run the .exe in the "Release" folder, it
> hangs upon selecting a folder in the dialog....
>
> As I indicated before, I have downloaded a few exe s from CodeProject that
> use folderbrowsers, and get the SAME hanging.....
>
> Try the exe thing in the release folder several times. I would be curious
> if you get a hang.
>
> FWIW, I did a quick google on "folderbrowserdialog hans VS 2005" and get
> quite a few "hits"... this one is interesting:
>
> http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/d5d446ae9ae3b5af/51c4cb022010b082%2351c4cb022010b082
>
> here's MY code:
>
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles Button1.Click
>
> With FolderBrowserDialog1
>
> .RootFolder = Environment.SpecialFolder.Desktop
>
> .SelectedPath = Environment.SpecialFolder.Desktop.ToString
>
> .Description = "Please select the desired template(s)..."
>
> If .ShowDialog = Windows.Forms.DialogResult.OK Then
>
> Me.TextBox1.Text = .SelectedPath
>
>
>
> End If
>
> End With
>
> End Sub
>
>
>
>
> --
> Grumpy Aero Guy
>
>
>
> "gene kelley" <o***@by.me> wrote in message
> news:1m6c92ltsv17r85b6j33kc8vvmlfa6oopk@4ax.com...
>> On Mon, 19 Jun 2006 02:44:16 GMT, "Grumpy Aero Guy" <f*@beerme.org>
>> wrote:
>>
>>>My Bad..
>>>
>>>It is always hanging here... even in debugger:
>>>
>>>Me.Label1.Text = .SelectedPath
>>>
>>>It's the .selectedpath line that hangs
>>
>>
>> Start a new project.  Add a FolderBrowserDialog, Button and Label.
>> Copy the code for the Button1_Click event that I previously posted and
>> paste it to the button click event in the project.  Run the example.
>>
>> What results do you get?
>>
>> Gene
>
>
Author
18 Jun 2006 2:38 AM
ljh
Here is a folder browser that does not use the component.....

--------------------------------
Imports System.Windows.Forms.Design

Public Class BrowseForFolder
    Inherits FolderNameEditor

    Public Enum enuFolderBrowserFolder
        Desktop = FolderBrowserFolder.Desktop
        Favorites = FolderBrowserFolder.Favorites
        MyComputer = FolderBrowserFolder.MyComputer
        MyDocuments = FolderBrowserFolder.MyDocuments
        MyPictures = FolderBrowserFolder.MyPictures
        NetAndDialUpConnections =
FolderBrowserFolder.NetAndDialUpConnections
        NetworkNeighborhood = FolderBrowserFolder.NetworkNeighborhood
        Printers = FolderBrowserFolder.Printers
        Recent = FolderBrowserFolder.Recent
        SendTo = FolderBrowserFolder.SendTo
        StartMenu = FolderBrowserFolder.StartMenu
        Templates = FolderBrowserFolder.Templates
    End Enum

    'The FolderBrowserStyles collection is a member of FolderNameEditor
    Public Enum enuFolderBrowserStyles
        BrowseForComputer = FolderBrowserStyles.BrowseForComputer
        BrowseForEverything = FolderBrowserStyles.BrowseForEverything
        BrowseForPrinter = FolderBrowserStyles.BrowseForPrinter
        RestrictToDomain = FolderBrowserStyles.RestrictToDomain
        RestrictToFilesystem = FolderBrowserStyles.RestrictToFilesystem
        RestrictToSubfolders = FolderBrowserStyles.RestrictToSubfolders
        ShowTextBox = FolderBrowserStyles.ShowTextBox
    End Enum

    Public StartLocation As enuFolderBrowserFolder =
enuFolderBrowserFolder.MyDocuments     '.BrowseForComputer
    Public Style As enuFolderBrowserStyles =
enuFolderBrowserStyles.ShowTextBox

    Private mstrDescription As String = "Please select a directory below:"
    Private mstrPath As String = String.Empty
    Private mobjFB As New FolderBrowser()

    'Adds Description to dialog box
    Public Property Description() As String
        Get
            Return mstrDescription
        End Get
        Set(ByVal Value As String)
            mstrDescription = Value
        End Set
    End Property

    Public ReadOnly Property Path() As String
        Get
            Return mstrPath
        End Get
    End Property

    Public Function ShowBrowser() As System.Windows.Forms.DialogResult
        With mobjFB
            .Description = mstrDescription
            .StartLocation = CType(Me.StartLocation,
FolderNameEditor.FolderBrowserFolder)
            .Style = CType(Me.Style, FolderNameEditor.FolderBrowserStyles)
            Dim dlgResult As DialogResult = .ShowDialog
            If dlgResult = DialogResult.OK Then
                mstrPath = .DirectoryPath
            Else
                mstrPath = String.Empty
            End If
            Return dlgResult
        End With
    End Function

End Class
--------------------------------

Usage is like....

--------------------------------
  Dim objFB As New BrowseForFolder()
        If objFB.ShowBrowser = Windows.Forms.DialogResult.OK Then
            MessageBox.Show(objFB.Path)
        End If
--------------------------------



Show quoteHide quote
"Grumpy Aero Guy" <f*@beerme.org> wrote in message
news:k5Zkg.71417$P2.7652@tornado.ohiordc.rr.com...
>I have created an app that makes use of the FolderBrowserDialog.
>
> Upon building the app, installing and running it, and invoking the form
> using the dialog, it hangs upon folder selection and goes "not responding"
>
> Upon debugging, it hangs as well upon executing the line that extracts the
> selected folder without further explanation. All looks well in the
> debugger prior to executing the line marked with <<<<<<  below. When I
> step over that line, it hangs.
>
> With FolderBrowserDialog1
> .RootFolder = Environment.SpecialFolder.Desktop
>
> .SelectedPath = Environment.SpecialFolder.Desktop
>
> .Description = "Please select the desired template(s)..."
>
> If .ShowDialog = DialogResult.Cancel Then
>
> Exit Sub
>
> End If
>
> If .ShowDialog = DialogResult.OK Then
>
> DestinationPath = .SelectedPath    <<<<<<<<
>
> End If
>
> End With
>
>
> I noticed the same behavior from a downloaded exe created in VS2005 using
> the folderbrowser --- thus, I have two indenpent instances of the
> browserdialog hanging, one not of my creation.
>
> Any insights?
>
> --
> Grumpy Aero Guy
>
>
>
>
Author
18 Jun 2006 3:18 AM
Grumpy Aero Guy
OK... thank you.

I'll give it a shot !

--
Grumpy Aero Guy



Show quoteHide quote
"ljh" <Reply@groups.please> wrote in message
news:a03lg.16005$gv2.13981@bignews3.bellsouth.net...
> Here is a folder browser that does not use the component.....
>
> --------------------------------
> Imports System.Windows.Forms.Design
>
> Public Class BrowseForFolder
>    Inherits FolderNameEditor
>
>    Public Enum enuFolderBrowserFolder
>        Desktop = FolderBrowserFolder.Desktop
>        Favorites = FolderBrowserFolder.Favorites
>        MyComputer = FolderBrowserFolder.MyComputer
>        MyDocuments = FolderBrowserFolder.MyDocuments
>        MyPictures = FolderBrowserFolder.MyPictures
>        NetAndDialUpConnections =
> FolderBrowserFolder.NetAndDialUpConnections
>        NetworkNeighborhood = FolderBrowserFolder.NetworkNeighborhood
>        Printers = FolderBrowserFolder.Printers
>        Recent = FolderBrowserFolder.Recent
>        SendTo = FolderBrowserFolder.SendTo
>        StartMenu = FolderBrowserFolder.StartMenu
>        Templates = FolderBrowserFolder.Templates
>    End Enum
>
>    'The FolderBrowserStyles collection is a member of FolderNameEditor
>    Public Enum enuFolderBrowserStyles
>        BrowseForComputer = FolderBrowserStyles.BrowseForComputer
>        BrowseForEverything = FolderBrowserStyles.BrowseForEverything
>        BrowseForPrinter = FolderBrowserStyles.BrowseForPrinter
>        RestrictToDomain = FolderBrowserStyles.RestrictToDomain
>        RestrictToFilesystem = FolderBrowserStyles.RestrictToFilesystem
>        RestrictToSubfolders = FolderBrowserStyles.RestrictToSubfolders
>        ShowTextBox = FolderBrowserStyles.ShowTextBox
>    End Enum
>
>    Public StartLocation As enuFolderBrowserFolder =
> enuFolderBrowserFolder.MyDocuments     '.BrowseForComputer
>    Public Style As enuFolderBrowserStyles =
> enuFolderBrowserStyles.ShowTextBox
>
>    Private mstrDescription As String = "Please select a directory below:"
>    Private mstrPath As String = String.Empty
>    Private mobjFB As New FolderBrowser()
>
>    'Adds Description to dialog box
>    Public Property Description() As String
>        Get
>            Return mstrDescription
>        End Get
>        Set(ByVal Value As String)
>            mstrDescription = Value
>        End Set
>    End Property
>
>    Public ReadOnly Property Path() As String
>        Get
>            Return mstrPath
>        End Get
>    End Property
>
>    Public Function ShowBrowser() As System.Windows.Forms.DialogResult
>        With mobjFB
>            .Description = mstrDescription
>            .StartLocation = CType(Me.StartLocation,
> FolderNameEditor.FolderBrowserFolder)
>            .Style = CType(Me.Style, FolderNameEditor.FolderBrowserStyles)
>            Dim dlgResult As DialogResult = .ShowDialog
>            If dlgResult = DialogResult.OK Then
>                mstrPath = .DirectoryPath
>            Else
>                mstrPath = String.Empty
>            End If
>            Return dlgResult
>        End With
>    End Function
>
> End Class
> --------------------------------
>
> Usage is like....
>
> --------------------------------
>  Dim objFB As New BrowseForFolder()
>        If objFB.ShowBrowser = Windows.Forms.DialogResult.OK Then
>            MessageBox.Show(objFB.Path)
>        End If
> --------------------------------
>
>
>
> "Grumpy Aero Guy" <f*@beerme.org> wrote in message
> news:k5Zkg.71417$P2.7652@tornado.ohiordc.rr.com...
>>I have created an app that makes use of the FolderBrowserDialog.
>>
>> Upon building the app, installing and running it, and invoking the form
>> using the dialog, it hangs upon folder selection and goes "not
>> responding"
>>
>> Upon debugging, it hangs as well upon executing the line that extracts
>> the selected folder without further explanation. All looks well in the
>> debugger prior to executing the line marked with <<<<<<  below. When I
>> step over that line, it hangs.
>>
>> With FolderBrowserDialog1
>> .RootFolder = Environment.SpecialFolder.Desktop
>>
>> .SelectedPath = Environment.SpecialFolder.Desktop
>>
>> .Description = "Please select the desired template(s)..."
>>
>> If .ShowDialog = DialogResult.Cancel Then
>>
>> Exit Sub
>>
>> End If
>>
>> If .ShowDialog = DialogResult.OK Then
>>
>> DestinationPath = .SelectedPath    <<<<<<<<
>>
>> End If
>>
>> End With
>>
>>
>> I noticed the same behavior from a downloaded exe created in VS2005 using
>> the folderbrowser --- thus, I have two indenpent instances of the
>> browserdialog hanging, one not of my creation.
>>
>> Any insights?
>>
>> --
>> Grumpy Aero Guy
>>
>>
>>
>>
>
>