Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using System.Windows.Forms;
- partial class Form1
- {
- private void kenmomen(string[] filenames)
- {
- // ♪♪コピペゾーン♪♪
- }
- protected override void Dispose(bool disposing)
- {
- base.Dispose(disposing);
- }
- private void de(object sender, DragEventArgs e)
- {
- if (e.Data.GetDataPresent(DataFormats.FileDrop))
- e.Effect = DragDropEffects.Copy;
- else e.Effect = DragDropEffects.None;
- }
- private void dd(object sender, DragEventArgs e)
- {
- string[] fns = (string[])e.Data.GetData(DataFormats.FileDrop, false);
- if (fns.Length > 0)
- kenmomen(fns);
- }
- }
- static class Program
- {
- [STAThread]
- static void Main()
- {
- Application.EnableVisualStyles();
- Application.Run(new Form1());
- }
- }
- public partial class Form1 : Form
- {
- public Form1()
- {
- this.AllowDrop = true;
- this.DragDrop += new DragEventHandler(dd);
- this.DragEnter += new DragEventHandler(de);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment