Windows Context Menu
-
Hey guys I know how to add an item to windows context menu but how do I reference that file that I right clicked on in my c#/vb app? Thanks
Once you have associated a specific file extension with your app, double-clicking such file in Windows Explorer will launch your app and pass the file (or the selected files) as command line arguments. So look either into the parameters of your static Main() method, or, easier, use some of the Environment methods (GetCommandLineArgs). :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Getting an article published on CodeProject now is hard and not sufficiently rewarded.
-
Once you have associated a specific file extension with your app, double-clicking such file in Windows Explorer will launch your app and pass the file (or the selected files) as command line arguments. So look either into the parameters of your static Main() method, or, easier, use some of the Environment methods (GetCommandLineArgs). :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Getting an article published on CodeProject now is hard and not sufficiently rewarded.
-
You're welcome. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Getting an article published on CodeProject now is hard and not sufficiently rewarded.
-
Hey guys I know how to add an item to windows context menu but how do I reference that file that I right clicked on in my c#/vb app? Thanks
Blikkies wrote:
I know how to add an item to windows context menu
Hey Blikkies Regarding above quote, would you be able to point me into the right direction to accomplish this? I am trying to formulate some code in order to "archive" files by simply moving and renaming them from one folder into another via user interface (that would be my app executed through the windows context menu). The whole thing is thus mainly depending on the integration into the windows context menu (and the outlook 2007 menu, but I'm trying a few things already for that one). Would be deeply appreciated if you could help. Thanks & regards Firl