windows-explorer

If Windows explorer is open at a specific path, do not create a new instance

…衆ロ難τιáo~ 提交于 2021-02-16 21:30:42
问题 I am using the following code so that when the user clicks on a button, an instance of Windows Explorer is opened at a specific path. But this causes a new instance of the Explorer to be opened. I want to change it so that, if Explorer is already open in the same path, the program does not create a new process and instead bring the open instance to front. private void button_Click(object sender, EventArgs e) { if (Directory.Exists(myPath)) Process filesFolder = Process.Start("explorer.exe",

If Windows explorer is open at a specific path, do not create a new instance

断了今生、忘了曾经 提交于 2021-02-16 21:29:47
问题 I am using the following code so that when the user clicks on a button, an instance of Windows Explorer is opened at a specific path. But this causes a new instance of the Explorer to be opened. I want to change it so that, if Explorer is already open in the same path, the program does not create a new process and instead bring the open instance to front. private void button_Click(object sender, EventArgs e) { if (Directory.Exists(myPath)) Process filesFolder = Process.Start("explorer.exe",

A command or message or DLL call to set automatic hiding of Windows taskbar?

别等时光非礼了梦想. 提交于 2020-05-16 05:37:30
问题 I need to set or toggle auto-hiding of Windows 10 taskbar programmatically. An action bound to a hotkey for productivity and convenience. Is there a command-line command or a DLL call which allows to achieve equivalent of flipping the following switch: Currently I am achieving this by opening the above Settings window and sending keystrokes for search, followed by Down s and Space and Alt + F4 but it is slow and unreliable. This question is not language-specific since DLL calls look pretty

MFC: Address Bar control like Windows Explorer

南笙酒味 提交于 2020-01-16 05:51:06
问题 In my MFC app, I'm attempting to make a window that resembles the Windows 7 Open File dialog, but it browses a virtual/fake file system. It doesn't need to be pixel-perfect, but I'd like parity with the native OS dialog where possible. Probably the most challenging part is the address bar the runs along the top of an Open dialog. The address bar control is also atop all Windows Explorer windows. It shows the folder names that make up your path. It shows and hides buttons when moused over

Send Folder Rename Command to Windows Explorer

元气小坏坏 提交于 2020-01-11 06:15:10
问题 I have a shell extension made in .NET that creates folders (think of it as a context menu New -> New Folder option clone) and uses a InputBox to input the name of the folder from the user. Instead I want to send the rename command on the folder to the already open Windows Explorer window. It should be just like how Explorer lets us name a new folder: On searching, I found this : Windows Explorer Shell Extension: create file and enter "rename" mode. It says to use the IShellView::SelectItem

Programmatically sort folders on Windows 8

和自甴很熟 提交于 2020-01-03 15:37:10
问题 Windows 8 does not seem to persist sort orders on individual folders. I'm guessing when explorer.exe terminates (like when rebooting) these preferences get discarded? Beats me, all I know is after a time (like a few days) those preferences get totally lost. Is there a way to duplicate programmatically sorting folders in Windows Explorer (opting one of the 'Sort by' options in the context menu)? Such that, say I have a folder opened in the Windows UI. Say the folder is currently set to sort by

C# And windows explorer context menu?

青春壹個敷衍的年華 提交于 2020-01-03 05:14:21
问题 I have an idea for a little C# program, where I want to be able to right click on a file in windows explorer and somehow 'tag' that file. Subsequent right clicks would show it's tagged state. Bottom line is that I need to be able to right click on a file, see a custom menu item and perform a custom action as well as visualize some info. Never having done this, I'm not even sure where to start... :) Any good example out there? Things I should read up on? Links? Thanks! 回答1: The keyword you're

Showing a Windows context menu for multiple items

旧城冷巷雨未停 提交于 2020-01-01 18:15:30
问题 I have an application that lists files, and I allow the user to right-click on a file and my application shows the Windows context menu for the selected file. I use SHParseDisplayName to get a pidl for a filename. Then I bind to the parent object: IntPtr pidlLast = IntPtr.Zero; SHBindToParent(pidl, typeof(IShellFolder).GUID, out oShellFolder, out pidlLast); After I have the parent I can get build the context menu: IntPtr result = IntPtr.Zero; IShellFolder shellFolder = (IShellFolder

Showing a Windows context menu for multiple items

我只是一个虾纸丫 提交于 2020-01-01 18:15:08
问题 I have an application that lists files, and I allow the user to right-click on a file and my application shows the Windows context menu for the selected file. I use SHParseDisplayName to get a pidl for a filename. Then I bind to the parent object: IntPtr pidlLast = IntPtr.Zero; SHBindToParent(pidl, typeof(IShellFolder).GUID, out oShellFolder, out pidlLast); After I have the parent I can get build the context menu: IntPtr result = IntPtr.Zero; IShellFolder shellFolder = (IShellFolder

How to create a right-click context shell shortcut “edit with Emacs”?

与世无争的帅哥 提交于 2019-12-31 08:13:19
问题 Notepad++ automatically adds a shell shortcut so that when you're in Windows Explorer, you can right-click on a file and select "edit with Notepad++". How can I do the same with emacs? I am using GNU Emacs 22.3 for Windows. 回答1: Here's what I have - similar to some other answer. Create a new text file somewhere called emacs-conextmenu.reg (or anything-you-want.reg) and paste the following in: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell] [HKEY_CLASSES_ROOT\*\shell