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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Drop Files at Runtime

Drop Files at Runtime

Scheduled Pinned Locked Moved C#
csharpdelphitutorial
2 Posts 2 Posters 1 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.
  • P Offline
    P Offline
    Paul Kettley
    wrote on last edited by
    #1

    Hi All, Wondering if someone could explain to me how to send a drop event to a different application. The Drag and Drop events allow an application to move objects around in a drag and drop event, but how do you get an application to send a drop event with the list of file(s) to a different application. My application is .NET 2.0 compatible, the other application is written in delphi. The delphi application is a large complex application and is used throughout the company, the new application has to be able to process a file, convert it to a different file, save it, and then send a drop command with the new filepath to the delphi application which has drag/drop events enabled on its main window. I'm needing something that will allow me to give it a handle of a window, a list of files and a structure. Oh last but not least I'm coding in C#.

    M 1 Reply Last reply
    0
    • P Paul Kettley

      Hi All, Wondering if someone could explain to me how to send a drop event to a different application. The Drag and Drop events allow an application to move objects around in a drag and drop event, but how do you get an application to send a drop event with the list of file(s) to a different application. My application is .NET 2.0 compatible, the other application is written in delphi. The delphi application is a large complex application and is used throughout the company, the new application has to be able to process a file, convert it to a different file, save it, and then send a drop command with the new filepath to the delphi application which has drag/drop events enabled on its main window. I'm needing something that will allow me to give it a handle of a window, a list of files and a structure. Oh last but not least I'm coding in C#.

      M Offline
      M Offline
      Malcolm Smart
      wrote on last edited by
      #2

      Not sure, but this sounds like you need to interop to the raw API call -

      [DllImport("user32.dll", CharSet=CharSet.Auto)]
      public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam,lParam);

      You can then get the handle of your Dephi window, and send whatever message you like. YOu need to look up the actual message format and structure for WM_DROPFILES message (that was a pure guess at the message name)

      "More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF

      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