Skip to content

Send filename by the Right-Click send to context menu

Simon

Asked Aug 25, 2010, 3:25 AM EDT2 answers
Share
LinkedInX
Hey everybody!
I'm new here and in C#
I start to study it by myself and I'm trying to create a right-click context menu command for sending
the filename and path to my program.
 So far I got simple program with textbox
my goal is when I'm clicking on the right click context menu and selecting SendTo-> MyApp
it will open MyApp and put the filename and his path to the textbox.
 
Thanx!

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Mahesh Chand
    0
    OK for this, you need to get filename from your application and on your ContextMenu click event handler, you need to call your application using the Process class. Search this site for Process class.

    You also need to overload the main method of your application so it can a parameter or use command line arguments options.
    Search this site for pass command line arguments to learn how to pass command line arguments.

    If you're still having problem, post it here.
    0
  • 0
    Thanx for the help I mange it to work
    0