FolderBrowserDialog挂起应用程序

编程入门 行业动态 更新时间:2024-10-09 00:49:34
本文介绍了FolderBrowserDialog挂起应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已将问题缩小到一个简单的例子。一个带有两个 按钮的表单。一个EXIT和一个FBD。退出按钮执行结束按钮。结束 申请。 FBD按钮执行FolderBrowserDialog,没有别的。 当我启动应用程序并点击EXIT时,一切正常。但是如果 它显示FBD框(即使我没有选择文件夹并立即点击 取消)然后尝试退出两件事之一。要么(1) 程序挂起并且永不退出,要么(2)程序''似乎''要退出,但它仍然是 仍在运行(如任务列表中所示) ),在这两种情况下,程序都要从任务列表中杀死。 研究这个问题,我发现FBD存在问题 其中路径是> 128个字符,以及线程模型不是STA的情况。 这两个问题都不适用于此。 (我的线程模型是STA,而且我不需要甚至必须为此选择一个文件夹)。 我正在运行.NET 1.1和我的system.windows.forms.dll是版本1.1.4322.2032。 任何人都可以确认这个错误,或者知道解决方法吗?现在,我有完全跳过FBD的 ,让用户输入文件夹路径 (呃!)。 感谢您的帮助。 John

I have narrowed a problem down to a simple example. A form with two buttons. One EXIT and one FBD. The exit button does an "END" to end the application. The FBD button does a FolderBrowserDialog and nothing else. When I start the application and hit EXIT everything works fine. However if it display the FBD box (even if I don''t pick a folder and immediately hit cancel) and then try to exit one of two things happens. Either (1) the program hangs and never exits or (2) the program ''seems'' to exit but it is still running (as seen in the tasklist), and in both cases the program has to be killed from the tasklist. Researching this issue, I found that there were problems associated with FBD where paths were > 128 chars, and also if the threading model was not STA. Both of these issues do not apply here. (my thread model is STA, and I don''t even have to pick a folder for this to happen). I am running .NET 1.1 and my system.windows.forms.dll is ver 1.1.4322.2032. Can anybody confirm this bug, or know of a workaround? Right now, I have to skip the FBD entirely, and have the user just type in a folder path (Ugh!). Thanks for any help. John

推荐答案

一些额外的信息...这是第二次我正在发布关于这个 问题...我第一次尝试重新启动它似乎工作。这次 它在重新启动后运行一次,然后再次失败。 我使用SysInternals进程资源管理器尝试获取一些add''l信息。 应用程序挂起后,processexplorer表示还有1个线程正在运行。它给出的信息是0x7c810867,然后是线程的 NTdll.dll!RtlConvertUiListToApiList + 0x276。当我点击 模块时进程资源管理器中的按钮导致了属性窗口 (比如 ,当你右击目录并点击属性时)弹出我的目录中的一个 !现在这很奇怪。 我绝不是windows xp内部专家,但我希望这个 可能对某人有所帮助那里。 我在这里不知所措。我无法想象我的PC配置是如此非常不同,以至于我看到了其他人没有看到的问题。 如果有人有任何想法,我将非常感谢他们。 谢谢,John " JohnR" <乔****** @ hotmail>写在消息 新闻:WgoQe.2198 Some additional info... this is the second time I''m posting about this issue... the first time I tried rebooting and it seemed to work. This time it works once after the reboot, then fails again. I used the SysInternals process explorer to try and get some add''l info. After the application hangs, processexplorer says that there is still 1 thread running. The info it gave was 0x7c810867 followed by NTdll.dll!RtlConvertUiListToApiList+0x276 for the thread. When I hit the "module" button in process explorer it caused a "Properties window" (like when you right click a directory and hit properties) to pop up against one of my directories! Now that is weird. I''m in no way an windows xp internals expert but I was hoping that this might make some sense to somebody out there. I''m at a loss here. I can''t imagine that my PC configuration is so very different that I''m seeing a problem that nobody else is seeing. If anybody has any ideas, I would greatly appreciate them. Thanks, John "JohnR" <Jo******@hotmail> wrote in message news:WgoQe.2198

LK.1556@trndny09 ... LK.1556@trndny09... 我已将问题缩小到一个简单的例子。带有两个按钮的表单。一个EXIT和一个FBD。退出按钮执行结束按钮。结束申请。 FBD按钮执行FolderBrowserDialog而没有别的。 当我启动应用程序并点击EXIT时,一切正常。但是如果它显示FBD框(即使我没有选择文件夹并立即取消),然后尝试退出两件事之一。要么(1)程序挂起并且永不退出,要么(2)程序''似乎''退出但是它仍在运行(如任务列表中所示),并且在两种情况下<必须从任务列表中杀死程序。 研究这个问题,我发现有一些问题与 FBD有关,路径是> 128个字符,如果线程模型不是STA。这两个问题都不适用于此。 (我的线程模型是STA,而且我甚至不需要选择一个文件夹来实现)。 我正在运行.NET 1.1和我的system.windows.forms .dll是ver 1.1.4322.2032。 任何人都可以确认这个bug,或者知道解决方法吗?现在,我已经完全跳过了FBD,让用户只需输入文件夹路径(唉!)。 感谢您的帮助。 John I have narrowed a problem down to a simple example. A form with twobuttons. One EXIT and one FBD. The exit button does an "END" to end theapplication. The FBD button does a FolderBrowserDialog and nothing else. When I start the application and hit EXIT everything works fine. However if it display the FBD box (even if I don''t pick a folder and immediately hit cancel) and then try to exit one of two things happens. Either (1) the program hangs and never exits or (2) the program ''seems'' to exit but it is still running (as seen in the tasklist), and in both cases the program has to be killed from the tasklist. Researching this issue, I found that there were problems associated with FBD where paths were > 128 chars, and also if the threading model was not STA. Both of these issues do not apply here. (my thread model is STA, and I don''t even have to pick a folder for this to happen). I am running .NET 1.1 and my system.windows.forms.dll is ver 1.1.4322.2032. Can anybody confirm this bug, or know of a workaround? Right now, I have to skip the FBD entirely, and have the user just type in a folder path (Ugh!). Thanks for any help. John

John, 这是Net 1.1 SP1中修复的已知错误。 我希望这会有所帮助, Cor John, This is a known bug fixed in Net 1.1 SP1. I hope this helps, Cor

更多推荐

FolderBrowserDialog挂起应用程序

本文发布于:2023-11-03 05:05:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1554307.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   挂起   FolderBrowserDialog

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!