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. How di I add a "Send To..." item

How di I add a "Send To..." item

Scheduled Pinned Locked Moved C#
csharpalgorithmsquestion
4 Posts 2 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.
  • A Offline
    A Offline
    Adrian Hall
    wrote on last edited by
    #1

    I'm sure this is totally documented and I am just looking / searching for the wrong things here - if some kind soul can point me to the right documentation, then I'm sure I can work it out for myself. I want to add a new element to the Windows Explorer "Send To..." - call it "Send To->Webmail Recipient" - what it will do is parcel up the files that have been highlighted and present a (C#) form that will ask for a recipient and then send those files via my webmail system to the recipient. Can someone point me in the right direction? -Adrian

    S 1 Reply Last reply
    0
    • A Adrian Hall

      I'm sure this is totally documented and I am just looking / searching for the wrong things here - if some kind soul can point me to the right documentation, then I'm sure I can work it out for myself. I want to add a new element to the Windows Explorer "Send To..." - call it "Send To->Webmail Recipient" - what it will do is parcel up the files that have been highlighted and present a (C#) form that will ask for a recipient and then send those files via my webmail system to the recipient. Can someone point me in the right direction? -Adrian

      S Offline
      S Offline
      Stephane Rodriguez
      wrote on last edited by
      #2

      This article looks helpful[^].

      A 1 Reply Last reply
      0
      • S Stephane Rodriguez

        This article looks helpful[^].

        A Offline
        A Offline
        Adrian Hall
        wrote on last edited by
        #3

        I thought so too - however, the article pointed to shows you how to add a "Send To" menu item to your own application, not how to add a menu item to the "Send To" menu. -Adrian

        S 1 Reply Last reply
        0
        • A Adrian Hall

          I thought so too - however, the article pointed to shows you how to add a "Send To" menu item to your own application, not how to add a menu item to the "Send To" menu. -Adrian

          S Offline
          S Offline
          Stephane Rodriguez
          wrote on last edited by
          #4

          I thought there were interesting stuff in the code itself, but anyway. A SendTo handler is a COM object which implements the IDropHandler interface. Mike dunn has written an article[^] about how to do this using C++/ATL. Now for C#, the basic start is to implement the IDropHandler interface using the appropriate attributes. A good start is COMInteropPart2\CSharpServer from the VS.NET sample cds. It goes like this :

          // CSharpServer.cs
          // compile with: /target:library
          // post-build command: regasm CSharpServer.dll /tlb:CSharpServer.tlb

          using System;
          using System.Runtime.InteropServices;
          namespace CSharpServer
          {
          // Since the .NET Framework interface and coclass have to behave as
          // COM objects, we have to give them guids.
          [Guid("DBE0E8C4-1C61-41f3-B6A4-4E2F353D3D05")]
          public interface IManagedInterface
          {
          int PrintHi(string name);
          }

          [Guid("C6659361-1625-4746-931C-36014B146679")]
          public class InterfaceImplementation : IManagedInterface
          {
          public int PrintHi(string name)
          {
          Console.WriteLine("Hello, {0}!", name);
          return 33;
          }
          }
          }

          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