Denaes Posted August 5, 2004 Posted August 5, 2004 What I'm looking for: 1. my app in the Explorer Right-Click menu. Possibly a submenu off of Right-Click menu if I have more than one app in the future. 2. To be able to tell what file I'm clicking on. If no file is selected I want it to be grey. depending on file extension, a few different things might happen. Not that much, but I'm not sure where to start. Never really did a fully formless application since I had to create an app to open another app, fill out some textboxes, then click the begin key. That one was a fun dash through unmanaged code galore :D Quote
Denaes Posted August 5, 2004 Author Posted August 5, 2004 Got it. Here is how to add your File to the Explorer Shell Context (popup/Right-Click) Menu: 1. Open RegEdit (Start->Run... Type RegEdit) 2. Expand HKEY_CLASSES_ROOT 3. Expand * (should be the first key) 4. Add a key named "shell" if no key by that name exists. 5. Add a key to signify your application. Click on the key (looks like a folder) and right click on the (Default) value and select modify. In the "Value Data" textbox insert the name you want to show up on the context (right-click) menu. 6. Add a key with a name, but not one of the windows standard verbs (open, print, etc. Search on MSDN for a list). I used command. 7. Get to the (Default) value the same way as before in step 5. In this "Value Data" textbox, you want to include the path to your application (C:\Folder1\myApp.exe). Include a space and "%1" (include the quotes) to pass the path and file you clicked on as an argument. in your application, you can access this argument as a string with the following line of code: System.Environment.CommandLine If you want to do this with All Folders instead of applications, add your registry information to the "Folder" registry key rather than the * Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.