I want to implement a wpf application that will listen
to an event that comes from the desktop from the Send To shortcut. Such as
right click on the file and select send to app, then get the file path.
How would that be developed?
I want to implement a wpf application that will listen
to an event that comes from the desktop from the Send To shortcut. Such as
right click on the file and select send to app, then get the file path.
How would that be developed?
Copyright © 2021 Jogjafile Inc.
SendTo resolves the link in the %APPDATA%\Microsoft\Windows\SendTo folder and passes the filename as a parameter to the proper executable. You need to make your program accept command parameters and then process them.
EDIT: I originally missed the mention of WPF. So you could process command line args like this.
In you App.xaml add an entry for Startup like this:
In your App.xaml.cs add the App_OnStartup like this and store the args into an accessible variable:
In your main window get the args and do something with it:
Then place a shortcut to your program in the %APPDATA%\Microsoft\Windows\SendTo folder. When you right click on a file and SendTo your app, the filename will be the args that are passed into your app.