explorer

Gracefully Exit Explorer (Programmatically)

Deadly 提交于 2019-11-26 15:53:15
问题 How do you gracefully close Explorer programmatically? By that I mean, how do you invoke this function programmatically: Edit: Typo in the picture, it should say "Ctrl-Shift-Right-Click" instead of "Shift-Click". 回答1: I debugged this out of curiosity. All it does is post a message to one of explorer's windows: BOOL ExitExplorer() { HWND hWndTray = FindWindow(_T("Shell_TrayWnd"), NULL); return PostMessage(hWndTray, 0x5B4, 0, 0); } Of course this is an undocumented WM_USER message so the

Adding a menu item to Windows Explorer right click context menu in C# [closed]

浪尽此生 提交于 2019-11-26 15:46:39
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I am developing an application in which I want to add a menu item to context menu which appears when we right click one or more file or folders in Windows Explorer . By selecting multiple files or folder and clicking my item in context menu it should send the path of all the files

How can I programmatically refresh Windows Explorer?

和自甴很熟 提交于 2019-11-26 15:42:08
问题 I have a Windows shell extension that uses IShellIconOverlayIdentifier interface to display overlay icons on files and folders. My extension is a little like TortoiseCVS or TortoiseSVN. Sometimes I need to make Windows Explorer redraw all it's icons. To do this, I call SHChangeNotify like this: SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL) This refreshes the desktop and right hand pane of any open explorer windows. It doesn't refresh the folder tree on the left hand side of any

Drag and drop to Desktop / Explorer

我怕爱的太早我们不能终老 提交于 2019-11-26 13:22:53
Following my scenario. I got an Application which loads a Filestructure (Folders, Files) from a Database into a WPF ListView. Now I'd like to grab a file from this ListView, drag it over my Desktop (or some open explorer window) and drop it there. Basic Drag and Drop, nothing fancy. This sounds like a "standard" function for a windows application - but google won't help. So how can I achieve this? Interops? Thanks Edit : Thanks for the solution, I still had to do some googling. Here's my complete solution . Ray Burns DragDrop.DoDragDrop can do this as long as you pass it an appropriate

Embedding a File Explorer instance in a Windows Forms application form

自古美人都是妖i 提交于 2019-11-26 12:56:06
问题 My (C#, .NET 3.5) application generates files and, in addition to raising events that can be caught and reacted to, I want to display the target folder to the user in a form. The file-list is being shown within the same form as other information. I\'m using an instance of the WebBrowser control ( System.Windows.Forms.WebBrowser ), then navigating to the folder. This shows some default view of the explorer window, with the file summary panel on the left and the files in the \'Tiles\' (large

win10 提示该文件没有与之关联的应用来执行该操作

ぐ巨炮叔叔 提交于 2019-11-26 12:15:10
将下面代码复制进一个文本文档,然后将文本文档的txt后缀改成bat。双击运行,可以解决问题。 问题发生原因是之前通过注册表去除了桌面图标的快捷方式的小标志。 / ----------------------------------------------------------- / taskkill /f /im explorer.exe reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 29 /d "C:\Windows\system32\imageres.dll,154" /t reg_sz /f reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 29 /d "C:\Windows\system32\imageres.dll,154" /t reg_sz /f reg add "HKEY_CLASSES_ROOT\lnkfile" /v IsShortcut /t reg_sz /f reg add "HEKY_CLASSES_ROOT\piffile" /v IsShortcut /t reg_sz

SharePoint Tricks

此生再无相见时 提交于 2019-11-26 11:33:33
1. 64位IE浏览器无法使用Open with Explorer功能,而且会直接用浏览器去打开office文件(不管是否选择使用客户端打开) 2. 对于 large list or library,使用 Open with Explorer 时可能会碰到以下错误: \\sitecollection\DavWWWRoot\subsite\documentlibrary is not accessible. You might not have permissions to use this network resource. Contact the administrator of this server to find out if you have access permissions. A device attached to the system is not functioning. 是由于 list 或 library 的数据量太大造成的。参考 此页面 ,将注册表中以下条目修改为一个更大的值(例如,decimal类型、20000000)即可: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\FileAttributesLimitInBytes 3.

getElementById.contentDocument error in IE

人走茶凉 提交于 2019-11-26 11:25:24
问题 <html> <script type=\"text/javascript\"> function func() { alert(document.getElementById(\'iView\').contentDocument); } </script> <body> <iframe id=\"iView\" style=\"width:200px;height:200px;\"></iframe> <a href=\"#\" onclick=\"func();\">click</a> </body> </html> After click, Firefox returns [object HTMLDocument]. Internet Explorer returns undefined. How can I select the iView element with Internet Explorer? Thanks. 回答1: From this page: Mozilla supports the W3C standard of accessing iframe's

Programmatically selecting file in explorer

元气小坏坏 提交于 2019-11-26 10:59:07
问题 In my application I can programmatically open explorer and select a file using the following code: void BrowseToFile(LPCTSTR filename) { CString strArgs; strArgs = _T(\"/select,\\\"\"); strArgs += filename; strArgs += _T(\"\\\"\"); ShellExecute(0, _T(\"open\"), _T(\"explorer.exe\"), strArgs, 0, SW_NORMAL); } My problem is that if I call this function a second time with a different file, but in the same folder, the selection in explorer does not change to the new file, but remains on the

Open explorer on a file

孤者浪人 提交于 2019-11-26 08:49:49
问题 In Python, how do I jump to a file in the Windows Explorer? I found a solution for jumping to folders: import subprocess subprocess.Popen(\'explorer \"C:\\path\\of\\folder\"\') but I have no solution for files. 回答1: From Geoff Chappell's The Windows Explorer Command Line import subprocess subprocess.Popen(r'explorer /select,"C:\path\of\folder\file"') 回答2: A nicer and securer solution (only in Windows unfortunately) is os.startfile(). When it's given a folder instead of a file, it will open