2

I need to create a windows application which will have button named "Drag and Drop".

On click the button, it should drag and drop the selected text file (selected by open file dialog) to another application which runs on windows (it may be Windows Word/Excel/Adobe Pagemaker/SAP Logon Application etc).

Help me to work on this process. I have completed the application till the file selection process. I need C# coding for drag and drop a text file.

Brief Explanation:

We are working with SAP GUI Application. A VB Script file (having customer details and SAP Server logon information) has to be drag and drop on the SAP GUI Appliction. So that it will reads the VBScript file and log-in to the SAP Server.

This drag and drop is done by manually. If the 'drag and drop' is done using .NET windows application, then we will connect it to the SAP.

Iraiyavan
  • 31
  • 3
  • are you using WinForms or WPF? – chaosr Jan 11 '12 at 13:37
  • I must be missing something here - what's the supposed advantage/added feature over simply letting the user drag and drop the file into the other application? – Damien_The_Unbeliever Jan 11 '12 at 13:44
  • 1
    It sounds like you're using the wrong terminology. Drag-and-drop is not by clicking, it's by dragging. Or perhaps you don't mean that the button is actually clicked – only dragged-from? – ispiro Jan 11 '12 at 14:08
  • I think the real thing he wants is to copy the text from a text file and paste it in to another open program (not necessarily word). But the question needs to be clarified to explain better what is wanted. – Scott Chamberlain Jan 11 '12 at 14:31
  • possible duplicate of [Drag and drop to Desktop / Explorer](http://stackoverflow.com/questions/3040415/drag-and-drop-to-desktop-explorer) – Hans Passant Jan 11 '12 at 14:44

1 Answers1

0

You can find an overview over drag&drop with Windows Forms at: http://msdn.microsoft.com/de-de/library/za0zx9y0.aspx

A short tutorial for file drag & drop can be found at: http://www.dotnetcurry.com/ShowArticle.aspx?ID=192

chaosr
  • 494
  • 2
  • 6
  • 17