我对C#非常陌生。
我很无聊,有时我关闭了一个窗口,几秒钟后我注意到我再次需要这个窗口,并且对我重新打开Windows资源管理器并导航到特定路径感到非常沮丧。
所以我想创建一个小应用程序,允许我存储最后关闭的窗口列表。 并且通过按键快捷方式逐个还原最后一个关闭的窗口(就像我使用Firefox这样的浏览器)并用其他关键快捷方式显示最后一个窗口的列表。
我不知道如何获得窗口的路径,并且程序在路径改变时(用户导航时)也很重要。
感谢帮助。
我将在应用程序完成后发布链接。
I'm very new with C#.
I was boring that sometimes I close a window and after few seconds I note that I need that window again, and is very frustrating to me to reopen Windows Explorer and navigate to that specific path.
So I want to create a little app that permits me store a list of the last closed windows. And with a key shortcut restore one by one the last closed windows (just like I do with browsers like Firefox) and with other key shorcut display a list with the last n windows.
I don't know how to get the paths of the windows and is important that the program gets also when the paths changed (when the user navigates).
Thanks for help.
I will post the link once the app will be finished.
最满意答案
采取从这里 :
SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindows(); string filename; foreach ( SHDocVw.InternetExplorer ie in shellWindows ) { filename = Path.GetFileNameWithoutExtension( ie.FullName ).ToLower(); if ( filename.Equals( "explorer" ) ) { // Save the location off to your application Console.WriteLine( "Explorer location : {0}", ie.LocationURL ); // Setup a trigger for when the user navigates ie.NavigateComplete2 += new SHDocVw.DWebBrowserEvents2_NavigateComplete2EventHandler(handlerMethod); } }Taken from here:
SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindows(); string filename; foreach ( SHDocVw.InternetExplorer ie in shellWindows ) { filename = Path.GetFileNameWithoutExtension( ie.FullName ).ToLower(); if ( filename.Equals( "explorer" ) ) { // Save the location off to your application Console.WriteLine( "Explorer location : {0}", ie.LocationURL ); // Setup a trigger for when the user navigates ie.NavigateComplete2 += new SHDocVw.DWebBrowserEvents2_NavigateComplete2EventHandler(handlerMethod); } }更多推荐
发布评论