This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

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

By: a guest on Feb 26th, 2012  |  syntax: None  |  size: 0.33 KB  |  views: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data