如何将外部文件拖入到程序中?
using System;
using System.Windows.Forms;namespace WindowsApplication41
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.AllowDrop = true;
        }
        public void InvokeDragFile(string[] files)
        {
            //处理拖入文件,比如加入列表
            this.listBox1.Items.AddRange(files);
        }
        private void Form1_DragDrop(object sender, DragEventArgs e)
        {
            object obj= e.Data.GetData(DataFormats.FileDrop);
            if (obj != null)
            {
                string[] arr = (string[])obj;
                if (arr != null)
                {
                    InvokeDragFile(arr);
                }
            }
        }
        private void Form1_DragEnter(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(DataFormats.FileDrop))
                e.Effect = DragDropEffects.Copy;
        }
    }
}-------------------------------------------------------- 
很多人发蛋贴攒分,我也发发,但是有1分,发了也不能白发,我会随口说个技术基础点,不只局限于代码。 
高手可以忽略本贴