http://tech.ccidnet.com/pub/article/c1138_a39064_p1.html
解决方案 »
- <asp:literal id="ErrorMsg" runat="server"></asp:literal>这是真么意思啊
- 将数据库数据导出到excel:异常来自 HRESULT:0x800A03EC
- C#中WindowsForms 调用 FindWindow,SetForegroundWindow,奇怪的问题
- 如何理解“string是引用类型,但是作为参数传递时传值的”
- 几个问题
- 引发了“System.ArgumentNullException”类型的异常
- VS2005 C# 程序错误
- C# 数组转为IP地址
- 【求助】关于WAS、WCF、IIS三者的概念、关联。
- 菜鸟问题,请教调用默认网络连接问题?
- C#如何删除只读属性文件目录及下属所有文件夹、文件?
- 请帮我看一下这段代码有什么问题
ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfsystemwindowsformsdrageventargsclasstopic.htm
{
string[] sFileNames=(string[])e.Data.GetData(DataFormats.FileDrop,true); foreach(string sFileName in sFileNames)
{
listBox1.Items.Add(sFileName);
}
}private void listBox1_DragOver(object sender, System.Windows.Forms.DragEventArgs e)
{ //判断是否胃文件
if (e.Data.GetDataPresent(DataFormats.FileDrop))
e.Effect=DragDropEffects.Copy; //是的话进行Copy
else
e.Effect=DragDropEffects.None; //不是的话就不进行操作
}
private void Form1_Load(object sender, System.EventArgs e)
{
listBox1.AllowDrop=true;
}