Guest User

Untitled

a guest
Sep 9th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. using System;
  2. using System.IO;
  3. using System.Windows.Forms;
  4. partial class Form1
  5. {
  6. private void kenmomen(string[] filenames)
  7. {
  8. // ♪♪コピペゾーン♪♪
  9. }
  10. protected override void Dispose(bool disposing)
  11. {
  12. base.Dispose(disposing);
  13. }
  14. private void de(object sender, DragEventArgs e)
  15. {
  16. if (e.Data.GetDataPresent(DataFormats.FileDrop))
  17. e.Effect = DragDropEffects.Copy;
  18. else e.Effect = DragDropEffects.None;
  19. }
  20. private void dd(object sender, DragEventArgs e)
  21. {
  22. string[] fns = (string[])e.Data.GetData(DataFormats.FileDrop, false);
  23. if (fns.Length > 0)
  24. kenmomen(fns);
  25. }
  26. }
  27. static class Program
  28. {
  29. [STAThread]
  30. static void Main()
  31. {
  32. Application.EnableVisualStyles();
  33. Application.Run(new Form1());
  34. }
  35. }
  36. public partial class Form1 : Form
  37. {
  38. public Form1()
  39. {
  40. this.AllowDrop = true;
  41. this.DragDrop += new DragEventHandler(dd);
  42. this.DragEnter += new DragEventHandler(de);
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment