FolderBrowserDialog hangs in 2005

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Grumpy Aero Guy

    #1

    FolderBrowserDialog hangs in 2005

    I have created an app that makes use of the FolderBrowserDi alog.

    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 FolderBrowserDi alog1
    ..RootFolder = Environment.Spe cialFolder.Desk top

    ..SelectedPath = Environment.Spe cialFolder.Desk top

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

    If .ShowDialog = DialogResult.Ca ncel 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




  • Meelis

    #2
    Re: FolderBrowserDi alog hangs in 2005

    why you call .ShowDialog twice?

    i suggest something like this;

    Dim dlResult As DialogResult

    dlResult = .ShowDialog

    If dlResult = Windows.Forms.D ialogResult.Can cel Then
    Exit Sub
    ElseIf dlResult = Windows.Forms.D ialogResult.Ok Then
    DestinationPath = .SelectedPath
    End If


    Meelis




    "Grumpy Aero Guy" <fb@beerme.or g> wrote in message
    news:k5Zkg.7141 7$P2.7652@torna do.ohiordc.rr.c om...[color=blue]
    > I have created an app that makes use of the FolderBrowserDi alog.
    >
    > 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[/color]
    debugger[color=blue]
    > prior to executing the line marked with <<<<<< below. When I step over[/color]
    that[color=blue]
    > line, it hangs.
    >
    > With FolderBrowserDi alog1
    > .RootFolder = Environment.Spe cialFolder.Desk top
    >
    > .SelectedPath = Environment.Spe cialFolder.Desk top
    >
    > .Description = "Please select the desired template(s)..."
    >
    > If .ShowDialog = DialogResult.Ca ncel 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
    >
    >
    >
    >[/color]


    Comment

    • Grumpy Aero Guy

      #3
      Re: FolderBrowserDi alog hangs in 2005

      Fair enough....

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

      --
      Grumpy Aero Guy



      "Meelis" <mex@hot.ee> wrote in message
      news:uYp7AnkkGH A.4104@TK2MSFTN GP04.phx.gbl...[color=blue]
      > why you call .ShowDialog twice?
      >
      > i suggest something like this;
      >
      > Dim dlResult As DialogResult
      >
      > dlResult = .ShowDialog
      >
      > If dlResult = Windows.Forms.D ialogResult.Can cel Then
      > Exit Sub
      > ElseIf dlResult = Windows.Forms.D ialogResult.Ok Then
      > DestinationPath = .SelectedPath
      > End If
      >
      >
      > Meelis
      >
      >
      >
      >
      > "Grumpy Aero Guy" <fb@beerme.or g> wrote in message
      > news:k5Zkg.7141 7$P2.7652@torna do.ohiordc.rr.c om...[color=green]
      >> I have created an app that makes use of the FolderBrowserDi alog.
      >>
      >> 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[/color]
      > debugger[color=green]
      >> prior to executing the line marked with <<<<<< below. When I step over[/color]
      > that[color=green]
      >> line, it hangs.
      >>
      >> With FolderBrowserDi alog1
      >> .RootFolder = Environment.Spe cialFolder.Desk top
      >>
      >> .SelectedPath = Environment.Spe cialFolder.Desk top
      >>
      >> .Description = "Please select the desired template(s)..."
      >>
      >> If .ShowDialog = DialogResult.Ca ncel 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
      >>
      >>
      >>
      >>[/color]
      >
      >[/color]


      Comment

      • ljh

        #4
        Re: FolderBrowserDi alog hangs in 2005

        Here is a folder browser that does not use the component.....

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

        Public Class BrowseForFolder
        Inherits FolderNameEdito r

        Public Enum enuFolderBrowse rFolder
        Desktop = FolderBrowserFo lder.Desktop
        Favorites = FolderBrowserFo lder.Favorites
        MyComputer = FolderBrowserFo lder.MyComputer
        MyDocuments = FolderBrowserFo lder.MyDocument s
        MyPictures = FolderBrowserFo lder.MyPictures
        NetAndDialUpCon nections =
        FolderBrowserFo lder.NetAndDial UpConnections
        NetworkNeighbor hood = FolderBrowserFo lder.NetworkNei ghborhood
        Printers = FolderBrowserFo lder.Printers
        Recent = FolderBrowserFo lder.Recent
        SendTo = FolderBrowserFo lder.SendTo
        StartMenu = FolderBrowserFo lder.StartMenu
        Templates = FolderBrowserFo lder.Templates
        End Enum

        'The FolderBrowserSt yles collection is a member of FolderNameEdito r
        Public Enum enuFolderBrowse rStyles
        BrowseForComput er = FolderBrowserSt yles.BrowseForC omputer
        BrowseForEveryt hing = FolderBrowserSt yles.BrowseForE verything
        BrowseForPrinte r = FolderBrowserSt yles.BrowseForP rinter
        RestrictToDomai n = FolderBrowserSt yles.RestrictTo Domain
        RestrictToFiles ystem = FolderBrowserSt yles.RestrictTo Filesystem
        RestrictToSubfo lders = FolderBrowserSt yles.RestrictTo Subfolders
        ShowTextBox = FolderBrowserSt yles.ShowTextBo x
        End Enum

        Public StartLocation As enuFolderBrowse rFolder =
        enuFolderBrowse rFolder.MyDocum ents '.BrowseForComp uter
        Public Style As enuFolderBrowse rStyles =
        enuFolderBrowse rStyles.ShowTex tBox

        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.DialogRes ult
        With mobjFB
        .Description = mstrDescription
        .StartLocation = CType(Me.StartL ocation,
        FolderNameEdito r.FolderBrowser Folder)
        .Style = CType(Me.Style, FolderNameEdito r.FolderBrowser Styles)
        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.ShowBrows er = Windows.Forms.D ialogResult.OK Then
        MessageBox.Show (objFB.Path)
        End If
        --------------------------------



        "Grumpy Aero Guy" <fb@beerme.or g> wrote in message
        news:k5Zkg.7141 7$P2.7652@torna do.ohiordc.rr.c om...[color=blue]
        >I have created an app that makes use of the FolderBrowserDi alog.
        >
        > 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 FolderBrowserDi alog1
        > .RootFolder = Environment.Spe cialFolder.Desk top
        >
        > .SelectedPath = Environment.Spe cialFolder.Desk top
        >
        > .Description = "Please select the desired template(s)..."
        >
        > If .ShowDialog = DialogResult.Ca ncel 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
        >
        >
        >
        >[/color]


        Comment

        • Grumpy Aero Guy

          #5
          Re: FolderBrowserDi alog hangs in 2005

          OK... thank you.

          I'll give it a shot !

          --
          Grumpy Aero Guy



          "ljh" <Reply@groups.p lease> wrote in message
          news:a03lg.1600 5$gv2.13981@big news3.bellsouth .net...[color=blue]
          > Here is a folder browser that does not use the component.....
          >
          > --------------------------------
          > Imports System.Windows. Forms.Design
          >
          > Public Class BrowseForFolder
          > Inherits FolderNameEdito r
          >
          > Public Enum enuFolderBrowse rFolder
          > Desktop = FolderBrowserFo lder.Desktop
          > Favorites = FolderBrowserFo lder.Favorites
          > MyComputer = FolderBrowserFo lder.MyComputer
          > MyDocuments = FolderBrowserFo lder.MyDocument s
          > MyPictures = FolderBrowserFo lder.MyPictures
          > NetAndDialUpCon nections =
          > FolderBrowserFo lder.NetAndDial UpConnections
          > NetworkNeighbor hood = FolderBrowserFo lder.NetworkNei ghborhood
          > Printers = FolderBrowserFo lder.Printers
          > Recent = FolderBrowserFo lder.Recent
          > SendTo = FolderBrowserFo lder.SendTo
          > StartMenu = FolderBrowserFo lder.StartMenu
          > Templates = FolderBrowserFo lder.Templates
          > End Enum
          >
          > 'The FolderBrowserSt yles collection is a member of FolderNameEdito r
          > Public Enum enuFolderBrowse rStyles
          > BrowseForComput er = FolderBrowserSt yles.BrowseForC omputer
          > BrowseForEveryt hing = FolderBrowserSt yles.BrowseForE verything
          > BrowseForPrinte r = FolderBrowserSt yles.BrowseForP rinter
          > RestrictToDomai n = FolderBrowserSt yles.RestrictTo Domain
          > RestrictToFiles ystem = FolderBrowserSt yles.RestrictTo Filesystem
          > RestrictToSubfo lders = FolderBrowserSt yles.RestrictTo Subfolders
          > ShowTextBox = FolderBrowserSt yles.ShowTextBo x
          > End Enum
          >
          > Public StartLocation As enuFolderBrowse rFolder =
          > enuFolderBrowse rFolder.MyDocum ents '.BrowseForComp uter
          > Public Style As enuFolderBrowse rStyles =
          > enuFolderBrowse rStyles.ShowTex tBox
          >
          > 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.DialogRes ult
          > With mobjFB
          > .Description = mstrDescription
          > .StartLocation = CType(Me.StartL ocation,
          > FolderNameEdito r.FolderBrowser Folder)
          > .Style = CType(Me.Style, FolderNameEdito r.FolderBrowser Styles)
          > 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.ShowBrows er = Windows.Forms.D ialogResult.OK Then
          > MessageBox.Show (objFB.Path)
          > End If
          > --------------------------------
          >
          >
          >
          > "Grumpy Aero Guy" <fb@beerme.or g> wrote in message
          > news:k5Zkg.7141 7$P2.7652@torna do.ohiordc.rr.c om...[color=green]
          >>I have created an app that makes use of the FolderBrowserDi alog.
          >>
          >> 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 FolderBrowserDi alog1
          >> .RootFolder = Environment.Spe cialFolder.Desk top
          >>
          >> .SelectedPath = Environment.Spe cialFolder.Desk top
          >>
          >> .Description = "Please select the desired template(s)..."
          >>
          >> If .ShowDialog = DialogResult.Ca ncel 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
          >>
          >>
          >>
          >>[/color]
          >
          >[/color]


          Comment

          • Meelis

            #6
            Re: FolderBrowserDi alog hangs in 2005

            Hi
            Is DestinaionPath a variable, function or property?

            Meelis




            "Grumpy Aero Guy" <fb@beerme.or g> wrote in message
            news:RZ2lg.6131 5$mh.1584@torna do.ohiordc.rr.c om...[color=blue]
            > Fair enough....
            >
            > BUT, I still hang on the DestinationPath = .SelectedPath line.
            >
            > --
            > Grumpy Aero Guy
            >
            >
            >
            > "Meelis" <mex@hot.ee> wrote in message
            > news:uYp7AnkkGH A.4104@TK2MSFTN GP04.phx.gbl...[color=green]
            > > why you call .ShowDialog twice?
            > >
            > > i suggest something like this;
            > >
            > > Dim dlResult As DialogResult
            > >
            > > dlResult = .ShowDialog
            > >
            > > If dlResult = Windows.Forms.D ialogResult.Can cel Then
            > > Exit Sub
            > > ElseIf dlResult = Windows.Forms.D ialogResult.Ok Then
            > > DestinationPath = .SelectedPath
            > > End If
            > >
            > >
            > > Meelis
            > >
            > >
            > >
            > >
            > > "Grumpy Aero Guy" <fb@beerme.or g> wrote in message
            > > news:k5Zkg.7141 7$P2.7652@torna do.ohiordc.rr.c om...[color=darkred]
            > >> I have created an app that makes use of the FolderBrowserDi alog.
            > >>
            > >> 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[/color]
            > > debugger[color=darkred]
            > >> prior to executing the line marked with <<<<<< below. When I step over[/color]
            > > that[color=darkred]
            > >> line, it hangs.
            > >>
            > >> With FolderBrowserDi alog1
            > >> .RootFolder = Environment.Spe cialFolder.Desk top
            > >>
            > >> .SelectedPath = Environment.Spe cialFolder.Desk top
            > >>
            > >> .Description = "Please select the desired template(s)..."
            > >>
            > >> If .ShowDialog = DialogResult.Ca ncel 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[/color][/color][/color]
            using[color=blue][color=green][color=darkred]
            > >> the folderbrowser --- thus, I have two indenpent instances of the
            > >> browserdialog hanging, one not of my creation.
            > >>
            > >> Any insights?
            > >>
            > >> --
            > >> Grumpy Aero Guy
            > >>
            > >>
            > >>
            > >>[/color]
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • Grumpy Aero Guy

              #7
              Re: FolderBrowserDi alog hangs in 2005

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

              --
              Grumpy Aero Guy



              "Meelis" <mex@hot.ee> wrote in message
              news:eE0j9KqkGH A.3848@TK2MSFTN GP04.phx.gbl...[color=blue]
              > Hi
              > Is DestinaionPath a variable, function or property?
              >
              > Meelis
              >
              >
              >
              >
              > "Grumpy Aero Guy" <fb@beerme.or g> wrote in message
              > news:RZ2lg.6131 5$mh.1584@torna do.ohiordc.rr.c om...[color=green]
              >> Fair enough....
              >>
              >> BUT, I still hang on the DestinationPath = .SelectedPath line.
              >>
              >> --
              >> Grumpy Aero Guy
              >>
              >>
              >>
              >> "Meelis" <mex@hot.ee> wrote in message
              >> news:uYp7AnkkGH A.4104@TK2MSFTN GP04.phx.gbl...[color=darkred]
              >> > why you call .ShowDialog twice?
              >> >
              >> > i suggest something like this;
              >> >
              >> > Dim dlResult As DialogResult
              >> >
              >> > dlResult = .ShowDialog
              >> >
              >> > If dlResult = Windows.Forms.D ialogResult.Can cel Then
              >> > Exit Sub
              >> > ElseIf dlResult = Windows.Forms.D ialogResult.Ok Then
              >> > DestinationPath = .SelectedPath
              >> > End If
              >> >
              >> >
              >> > Meelis
              >> >
              >> >
              >> >
              >> >
              >> > "Grumpy Aero Guy" <fb@beerme.or g> wrote in message
              >> > news:k5Zkg.7141 7$P2.7652@torna do.ohiordc.rr.c om...
              >> >> I have created an app that makes use of the FolderBrowserDi alog.
              >> >>
              >> >> 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 FolderBrowserDi alog1
              >> >> .RootFolder = Environment.Spe cialFolder.Desk top
              >> >>
              >> >> .SelectedPath = Environment.Spe cialFolder.Desk top
              >> >>
              >> >> .Description = "Please select the desired template(s)..."
              >> >>
              >> >> If .ShowDialog = DialogResult.Ca ncel 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[/color][/color]
              > using[color=green][color=darkred]
              >> >> the folderbrowser --- thus, I have two indenpent instances of the
              >> >> browserdialog hanging, one not of my creation.
              >> >>
              >> >> Any insights?
              >> >>
              >> >> --
              >> >> Grumpy Aero Guy
              >> >>
              >> >>
              >> >>
              >> >>
              >> >
              >> >[/color]
              >>
              >>[/color]
              >
              >[/color]


              Comment

              • gene kelley

                #8
                Re: FolderBrowserDi alog hangs in 2005

                On Sun, 18 Jun 2006 13:28:12 GMT, "Grumpy Aero Guy" <fb@beerme.or g>
                wrote:
                [color=blue]
                >property of the control... that's what's baffling...[/color]

                No such property as DestinationPath for the FolderBrowserDi alog

                Private Sub Button1_Click(B yVal sender As System.Object, _
                ByVal e As System.EventArg s) Handles Button1.Click
                With FolderBrowserDi alog1
                .RootFolder = Environment.Spe cialFolder.Desk top
                .SelectedPath = Environment.Spe cialFolder.Desk top.ToString
                .Description = "Please select the desired template(s)..."

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


                End If
                End With
                End Sub

                Gene

                Comment

                • Grumpy Aero Guy

                  #9
                  Re: FolderBrowserDi alog hangs in 2005

                  My Bad..

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

                  Me.Label1.Text = .SelectedPath

                  It's the .selectedpath line that hangs

                  --
                  Grumpy Aero Guy



                  "gene kelley" <okay@by.me> wrote in message
                  news:dqab929k9b 6p6m9iuclvh7ngk h3o3cu7ht@4ax.c om...[color=blue]
                  > On Sun, 18 Jun 2006 13:28:12 GMT, "Grumpy Aero Guy" <fb@beerme.or g>
                  > wrote:
                  >[color=green]
                  >>property of the control... that's what's baffling...[/color]
                  >
                  > No such property as DestinationPath for the FolderBrowserDi alog
                  >
                  > Private Sub Button1_Click(B yVal sender As System.Object, _
                  > ByVal e As System.EventArg s) Handles Button1.Click
                  > With FolderBrowserDi alog1
                  > .RootFolder = Environment.Spe cialFolder.Desk top
                  > .SelectedPath = Environment.Spe cialFolder.Desk top.ToString
                  > .Description = "Please select the desired template(s)..."
                  >
                  > If .ShowDialog = Windows.Forms.D ialogResult.OK Then
                  > Me.Label1.Text = .SelectedPath
                  >
                  >
                  > End If
                  > End With
                  > End Sub
                  >
                  > Gene[/color]


                  Comment

                  • gene kelley

                    #10
                    Re: FolderBrowserDi alog hangs in 2005

                    On Mon, 19 Jun 2006 02:44:16 GMT, "Grumpy Aero Guy" <fb@beerme.or g>
                    wrote:
                    [color=blue]
                    >My Bad..
                    >
                    >It is always hanging here... even in debugger:
                    >
                    >Me.Label1.Te xt = .SelectedPath
                    >
                    >It's the .selectedpath line that hangs[/color]


                    Start a new project. Add a FolderBrowserDi alog, 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

                    Comment

                    • Grumpy Aero Guy

                      #11
                      Re: FolderBrowserDi alog hangs in 2005

                      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 "folderbrowserd ialog hans VS 2005" and get
                      quite a few "hits"... this one is interesting:



                      here's MY code:

                      Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
                      System.EventArg s) Handles Button1.Click

                      With FolderBrowserDi alog1

                      ..RootFolder = Environment.Spe cialFolder.Desk top

                      ..SelectedPath = Environment.Spe cialFolder.Desk top.ToString

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

                      If .ShowDialog = Windows.Forms.D ialogResult.OK Then

                      Me.TextBox1.Tex t = .SelectedPath



                      End If

                      End With

                      End Sub




                      --
                      Grumpy Aero Guy



                      "gene kelley" <okay@by.me> wrote in message
                      news:1m6c92ltsv 17r85b6j33kc8vv mlfa6oopk@4ax.c om...[color=blue]
                      > On Mon, 19 Jun 2006 02:44:16 GMT, "Grumpy Aero Guy" <fb@beerme.or g>
                      > wrote:
                      >[color=green]
                      >>My Bad..
                      >>
                      >>It is always hanging here... even in debugger:
                      >>
                      >>Me.Label1.Tex t = .SelectedPath
                      >>
                      >>It's the .selectedpath line that hangs[/color]
                      >
                      >
                      > Start a new project. Add a FolderBrowserDi alog, 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[/color]


                      Comment

                      • Grumpy Aero Guy

                        #12
                        Re: FolderBrowserDi alog hangs in 2005

                        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



                        "Grumpy Aero Guy" <fb@beerme.or g> wrote in message
                        news:lfwlg.6188 1$mh.7285@torna do.ohiordc.rr.c om...[color=blue]
                        > 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 "folderbrowserd ialog hans VS 2005" and get
                        > quite a few "hits"... this one is interesting:
                        >
                        > http://groups.google.com/group/micro...c4cb022010b082
                        >
                        > here's MY code:
                        >
                        > Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
                        > System.EventArg s) Handles Button1.Click
                        >
                        > With FolderBrowserDi alog1
                        >
                        > .RootFolder = Environment.Spe cialFolder.Desk top
                        >
                        > .SelectedPath = Environment.Spe cialFolder.Desk top.ToString
                        >
                        > .Description = "Please select the desired template(s)..."
                        >
                        > If .ShowDialog = Windows.Forms.D ialogResult.OK Then
                        >
                        > Me.TextBox1.Tex t = .SelectedPath
                        >
                        >
                        >
                        > End If
                        >
                        > End With
                        >
                        > End Sub
                        >
                        >
                        >
                        >
                        > --
                        > Grumpy Aero Guy
                        >
                        >
                        >
                        > "gene kelley" <okay@by.me> wrote in message
                        > news:1m6c92ltsv 17r85b6j33kc8vv mlfa6oopk@4ax.c om...[color=green]
                        >> On Mon, 19 Jun 2006 02:44:16 GMT, "Grumpy Aero Guy" <fb@beerme.or g>
                        >> wrote:
                        >>[color=darkred]
                        >>>My Bad..
                        >>>
                        >>>It is always hanging here... even in debugger:
                        >>>
                        >>>Me.Label1.Te xt = .SelectedPath
                        >>>
                        >>>It's the .selectedpath line that hangs[/color]
                        >>
                        >>
                        >> Start a new project. Add a FolderBrowserDi alog, 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[/color]
                        >
                        >[/color]


                        Comment

                        Working...