在所有打开的资源管理器窗口的列表框中获取路径 [英] Get Path in a ListBox of all Open Explorer Windows

查看:16
本文介绍了在所有打开的资源管理器窗口的列表框中获取路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 ListBox 中列出所有打开的 Windows 资源管理器窗口及其活动路径.如果浏览器窗口导航到不同的路径,应用程序应该刷新 ListBox.

I want to list all open Windows Explorer windows with their active path in a ListBox. The app should refresh the ListBox if the explorer window is navigated to a different path.

例如两个资源管理器窗口打开.一个导航到 C:Windows,另一个导航到 D:Stuff.当应用程序运行时,它会将 C:WindowsD:Stuff 添加到 ListBox.然后,用户导航到打开的资源管理器窗口之一中的不同文件夹,例如 C:Windowssystem32.然后应用程序应该刷新 ListBox 并列出 C:Windowssystem32D:Stuff.

For e.g. two explorer windows are open. One is navigated to C:Windows and the other is navigated to D:Stuff. When the app it run, it adds C:Windows and D:Stuff to the ListBox. Then, the user navigates to a different folder in one of the open explorer windows like C:Windowssystem32. The app should then refresh the ListBox and list C:Windowssystem32 and D:Stuff instead.

我对如何执行此操作没有任何想法.任何指针将不胜感激.

I don't have any ideas on how to do this. Any pointers would be appreciated.

推荐答案

Here you can find an example how to access the paths in WindowsExplorer and InternetExplorer : http://omegacoder.com/?p=63

Here you can find an example how to access the paths in WindowsExplorer and InternetExplorer : http://omegacoder.com/?p=63

能够收到关于用户导航到不同路径这一事实的通知,老实说,我没有办法知道.

What about to be able to receive a notification about the fact that user navigated to different path, there is no way that I'm aware of, honestly.

所以我想到的第一个解决方案是使用 Timer 并检查每个滴答声.

So the first solution that comes to my mind, is use a Timer and check on every tick.

这篇关于在所有打开的资源管理器窗口的列表框中获取路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆