|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
FolderBrowserDialog won't open sometimesI'm using VS2005 Pro & WinXP. I have the following code to open a FolderBrowserDialog, with its initial path set to the directory specified by "oldDirectoryName", which does exist. FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog(); folderBrowserDialog.ShowNewFolderButton = allowCreateNewDirectory; folderBrowserDialog.SelectedPath = oldDirectoryName; DialogResult result = folderBrowserDialog.ShowDialog(); if (result == DialogResult.OK) return folderBrowserDialog.SelectedPath; return oldDirectoryName; When the folderBrowserDialog.ShowDialog(); statement is executed sometimes the dialog opens and works perfectly but a large percentage of the time it never opens and my application just hangs until I kill it. I'm running in the debug mode and I've tried stepping into that function but it will go no farther and just hangs without showing me any more code. Any ideas? Thanks, Ray hi Ray,
Ray Mitchell wrote: > When the folderBrowserDialog.ShowDialog(); statement is executed sometimes Sure? This dialog needs to enumerate folders first. When having a lot of > the dialog opens and works perfectly but a large percentage of the time it > never opens and my application just hangs until I kill it. I'm running in > the debug mode and I've tried stepping into that function but it will go no > farther and just hangs without showing me any more code. Any ideas? mapped and unreachable devices this may last its time... mfG --> stefan <--
Show quote
Hide quote
"Stefan Hoffmann" wrote: Well, I gave it 30 minutes then killed it. If I open a new instance of > hi Ray, > > Ray Mitchell wrote: > > When the folderBrowserDialog.ShowDialog(); statement is executed sometimes > > the dialog opens and works perfectly but a large percentage of the time it > > never opens and my application just hangs until I kill it. I'm running in > > the debug mode and I've tried stepping into that function but it will go no > > farther and just hangs without showing me any more code. Any ideas? > Sure? This dialog needs to enumerate folders first. When having a lot of > mapped and unreachable devices this may last its time... > > > mfG > --> stefan <-- > Windows Explorer it might take a few seconds to look at the sime directory but never anywhere near 30 minutes. Of course maybe I'm comparing apples and oranges here. hi Ray,
Ray Mitchell wrote: > Well, I gave it 30 minutes then killed it. If I open a new instance of Does it run well, when not being in debug mode. Thirty minutes is sure > Windows Explorer it might take a few seconds to look at the sime directory > but never anywhere near 30 minutes. Of course maybe I'm comparing apples and > oranges here. too long. mfG --> stefan <-- Does your main function have the STAThread attribute. This is necessary for
it to work correctly. --------- - G Himangi, LogicNP Software http://www.ssware.com Shell MegaPack: GUI Controls For Drop-In Windows Explorer like File/Folder Browsing Functionality (.Net & ActiveX Editions). EZNamespaceExtensions: Develop namespace extensions rapidly in .Net and MFC/ATL/C++ EZShellExtensions: Develop all shell extensions,explorer bars and BHOs rapidly in .Net & MFC/ATL/C++ --------- Show quoteHide quote "Ray Mitchell" <RayMitchell_NOSPAM_@MeanOldTeacher.com> wrote in message news:0A6D2D05-CAE0-442D-8718-CED72192AC1C@microsoft.com... > Hello, > > I'm using VS2005 Pro & WinXP. I have the following code to open a > FolderBrowserDialog, with its initial path set to the directory specified > by > "oldDirectoryName", which does exist. > > FolderBrowserDialog folderBrowserDialog = new > FolderBrowserDialog(); > folderBrowserDialog.ShowNewFolderButton = allowCreateNewDirectory; > folderBrowserDialog.SelectedPath = oldDirectoryName; > DialogResult result = folderBrowserDialog.ShowDialog(); > if (result == DialogResult.OK) > return folderBrowserDialog.SelectedPath; > return oldDirectoryName; > > When the folderBrowserDialog.ShowDialog(); statement is executed sometimes > the dialog opens and works perfectly but a large percentage of the time it > never opens and my application just hangs until I kill it. I'm running in > the debug mode and I've tried stepping into that function but it will go > no > farther and just hangs without showing me any more code. Any ideas? > > Thanks, > Ray >
Show quote
Hide quote
On Dec 15, 6:07 pm, "G Himangi" <nos...@nospam.com> wrote: If there are too many files in some folder, or maybe too many sub> Does your main function have the STAThread attribute. This is necessary for > it to work correctly. > > --------- > - G Himangi, LogicNP Software http://www.ssware.com > Shell MegaPack: GUI Controls For Drop-In Windows Explorer like File/Folder > Browsing Functionality (.Net & ActiveX Editions). > EZNamespaceExtensions: Develop namespace extensions rapidly in .Net and > MFC/ATL/C++ > EZShellExtensions: Develop all shell extensions,explorer bars and BHOs > rapidly in .Net & MFC/ATL/C++ > --------- > > "Ray Mitchell" <RayMitchell_NOSP***@MeanOldTeacher.com> wrote in message > > news:0A6D2D05-CAE0-442D-8718-CED72192AC1C@microsoft.com... > > > Hello, > > > I'm using VS2005 Pro & WinXP. I have the following code to open a > > FolderBrowserDialog, with its initial path set to the directory specified > > by > > "oldDirectoryName", which does exist. > > > FolderBrowserDialog folderBrowserDialog = new > > FolderBrowserDialog(); > > folderBrowserDialog.ShowNewFolderButton = allowCreateNewDirectory; > > folderBrowserDialog.SelectedPath = oldDirectoryName; > > DialogResult result = folderBrowserDialog.ShowDialog(); > > if (result == DialogResult.OK) > > return folderBrowserDialog.SelectedPath; > > return oldDirectoryName; > > > When the folderBrowserDialog.ShowDialog(); statement is executed sometimes > > the dialog opens and works perfectly but a large percentage of the time it > > never opens and my application just hangs until I kill it. I'm running in > > the debug mode and I've tried stepping into that function but it will go > > no > > farther and just hangs without showing me any more code. Any ideas? > > > Thanks, > > Ray folders in a folder, windows explorer will hangs when open it. I guess your suitation may be the same. fyitang wrote:
Show quoteHide quote > On Dec 15, 6:07 pm, "G Himangi" <nos...@nospam.com> wrote: Have you tried running this in release and seeing if you get the same >> Does your main function have the STAThread attribute. This is necessary for >> it to work correctly. >> >> --------- >> - G Himangi, LogicNP Software http://www.ssware.com >> Shell MegaPack: GUI Controls For Drop-In Windows Explorer like File/Folder >> Browsing Functionality (.Net & ActiveX Editions). >> EZNamespaceExtensions: Develop namespace extensions rapidly in .Net and >> MFC/ATL/C++ >> EZShellExtensions: Develop all shell extensions,explorer bars and BHOs >> rapidly in .Net & MFC/ATL/C++ >> --------- >> >> "Ray Mitchell" <RayMitchell_NOSP***@MeanOldTeacher.com> wrote in message >> >> news:0A6D2D05-CAE0-442D-8718-CED72192AC1C@microsoft.com... >> >>> Hello, >>> I'm using VS2005 Pro & WinXP. I have the following code to open a >>> FolderBrowserDialog, with its initial path set to the directory specified >>> by >>> "oldDirectoryName", which does exist. >>> FolderBrowserDialog folderBrowserDialog = new >>> FolderBrowserDialog(); >>> folderBrowserDialog.ShowNewFolderButton = allowCreateNewDirectory; >>> folderBrowserDialog.SelectedPath = oldDirectoryName; >>> DialogResult result = folderBrowserDialog.ShowDialog(); >>> if (result == DialogResult.OK) >>> return folderBrowserDialog.SelectedPath; >>> return oldDirectoryName; >>> When the folderBrowserDialog.ShowDialog(); statement is executed sometimes >>> the dialog opens and works perfectly but a large percentage of the time it >>> never opens and my application just hangs until I kill it. I'm running in >>> the debug mode and I've tried stepping into that function but it will go >>> no >>> farther and just hangs without showing me any more code. Any ideas? >>> Thanks, >>> Ray > > If there are too many files in some folder, or maybe too many sub > folders in a folder, windows explorer will hangs when open it. I guess > your suitation may be the same. Hi Ray, problem. (sorry if you have tried this just ran across this post) DH
Other interesting topics
Override the property
Compare and Null Bitmpa.Save & GZipStream - error linq --> changing a value? ProvideProperty attribute Value equality Connection string/Sql Server 2005/Windows authentication/ but not on domain Extract Text (string) from doc, xls, pdf ... I will pay for Null dynamic data in .net 3.5 SP1 -- performance, multi-tier |
|||||||||||||||||||||||