Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Windows Context Menu

Windows Context Menu

Scheduled Pinned Locked Moved C#
questioncsharptutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Blikkies
    wrote on last edited by
    #1

    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

    L F 2 Replies Last reply
    0
    • B Blikkies

      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

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      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.


      B 1 Reply Last reply
      0
      • L Luc Pattyn

        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.


        B Offline
        B Offline
        Blikkies
        wrote on last edited by
        #3

        Thanks for the fast response. It helped me a lot

        L 1 Reply Last reply
        0
        • B Blikkies

          Thanks for the fast response. It helped me a lot

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          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.


          1 Reply Last reply
          0
          • B Blikkies

            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

            F Offline
            F Offline
            Firlionel
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups