Guest User

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
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  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. }
Add Comment
Please, Sign In to add comment