SHARE
TWEET

how can I drag a file to an exe I create (drag and drop over the Icon) and have it as an argument when the exe start running

a guest Feb 26th, 2012 21 Never
  1. public frmMain()
  2. {
  3.  
  4.    this. richTextBox1.DragDrop += new System.Windows.Forms.DragEventHandler(arg);
  5. }
  6.  
  7. private void richTextBox1_DragEnter(object sender,
  8. System.Windows.Forms.DragEventArgs e)
  9. {
  10.    if (e.Data.GetDataPresent(DataFormats.Text))
  11.       e.Effect = DragDropEffects.Copy;
  12.    else
  13.       e.Effect = DragDropEffects.None;
  14. }
RAW Paste Data
Top