explorer

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

本秂侑毒 提交于 2019-11-27 11:49:13
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 and folders to my application executable for further processing. Please provide me some code for this if possible in C#.net . I searched on internet it is not possible but I think there should be some way because .NET is highly attached to Windows Shell. And if not possible please provide me code in either of these

How can I programmatically refresh Windows Explorer?

霸气de小男生 提交于 2019-11-27 11:42:44
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 Explorer windows. So I tried sending WM_SETTINGCHANGE like this: SendMessage(HWND_BROADCAST, WM

删除File Explorer、This PC、Folders

血红的双手。 提交于 2019-11-27 09:44:43
win+R,输入regedit,打开Registry Editor 定位:Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions 修改属性:ThisPCPolicy,值:Hide。(没有就新建一个String Value) 图片: {0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag 视频: {35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag 下载: {7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag 音乐: {a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag 桌面: {B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag 文档: {f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag 3D Object 定位:Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

Java - Sort Strings like Windows Explorer

╄→尐↘猪︶ㄣ 提交于 2019-11-27 09:10:26
I am trying to use code suggested by Sander Pham on another question. I need my java ArrayList of string names to be sorted like Windows Explorer does. His code worked for everything but for one issue. I would have liked to comment onto that question, but I need more reputation points to comment. Anyways... He suggested to use a custom comparator implemented class and use that to compare the string names. Here is the code of that class: class IntuitiveStringComparator implements Comparator<String> { private String str1, str2; private int pos1, pos2, len1, len2; public int compare(String s1,

Embedding a File Explorer instance in a Windows Forms application form

China☆狼群 提交于 2019-11-27 06:46:23
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 icon and text) view. For example, wb.Navigate(@"c:\path\to\folder\"); I'd like to suppress the panel and to

Open a folder using Process.Start

北战南征 提交于 2019-11-27 06:30:58
I saw the other topic and I'm having another problem. The process is starting (saw at task manager) but the folder is not opening on my screen. What's wrong? System.Diagnostics.Process.Start("explorer.exe", @"c:\teste"); Have you made sure that the folder " c:\teste " exists? If it doesn't, explorer will open showing some default folder (in my case " C:\Users\[user name]\Documents "). Update I have tried the following variations: // opens the folder in explorer Process.Start(@"c:\temp"); // opens the folder in explorer Process.Start("explorer.exe", @"c:\temp"); // throws exception Process

How to use filegroupdescriptor to drag file to explorer c#

允我心安 提交于 2019-11-27 06:06:50
问题 I would like to drag and drop an element of a listbox to explorer. When the drag and drop is started, I need to prepare the file on demand and save it to a memory stream. Can you provide me with an example on how to do it using the FileGroupDescriptor data structure? Thanks. Andrea 回答1: you can find an example on how to do this here Transferring Virtual Files to Windows Explorer in C#; also some good info on the topic here: Outlook Drag and Drop in C# In short what you have to do is to init

How to I launch a ruby script from the command line by just its name?

▼魔方 西西 提交于 2019-11-27 05:23:58
On windows, I can run my ruby script like this: > ruby myscript.rb but I want to set things up so that I can just do this instead?.. > myscript.rb How do I do this? I know it's possible because I've recently moved from one PC that had this set up to a new PC that doesn't (yet). Éric Malenfant Associate the ".rb" file extension with the ruby interpreter. On Windows XP, one way to do this is to select "Tools|Folder options" in the file explorer, and to setup the association in the "File types" tab. Another way would be to enter the following on the commandline which creates this file association

getElementById.contentDocument error in IE

≡放荡痞女 提交于 2019-11-27 05:00:47
<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. From this page : Mozilla supports the W3C standard of accessing iframe's document object through IFrameElm.contentDocument, while Internet Explorer requires you to access it through document

How do you show the Windows Explorer context menu from a C# application?

烈酒焚心 提交于 2019-11-27 04:19:31
问题 I have a file listing in my application and I would like to allow people to right-click on an item and show the Windows Explorer context menu. I'm assuming I would need to use the IContextMenu interface, but I'm not really sure where to start. 回答1: There's a very good tutorial (albeit in C++) about hosting an IContextMenu on Raymond Chen's blog in 11 parts (in order): Initial foray Displaying the context menu Invocation location Key context Handling menu messages Displaying menu help Invoking