Board index » Visual Studio » Call up application from context menu (on multiple selected files)
|
RodneyViana
|
Call up application from context menu (on multiple selected files)
Visual Studio346
Hi all, I am writing an application which will intake arguments of filenames for processing: e.g. MyApp.exe "C:\abc.txt" "C:\def.doc" - then, MyApp will process the 2 files by parsing the 2 arguments - the retrieval method used is My.Application.CommandLineArgs It works as expected until I work with context menu: I added a few entries in registry, such that on any file, the windows context menu (right-click menu) will have a new entry "Open with MyApp", with this entry is having the follwing "command" in registry: 'MyApp.exe "%1"' This works with single file, but when I select multiple files and do "Open with MyApp", what happened is that each selected file will trigger the startup of 1 MyApp, with argument to MyApp as only containing filename of 1 of the selected files. Instead, I want to have the behavior as only 1 single MyApp will be triggerred, and the list of filename of selected files will be its argument. Would anyone advice how to do this please? Please let me know if you need further clarification on my problem. Thanks in advance! - |
