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.
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);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With