将链接从资源管理器拖到列表视图 [英] Drag a link from explorer to listview

查看:138
本文介绍了将链接从资源管理器拖到列表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想将一个链接从Internet Explorer的地址栏(opera,chrome,即Firefox等)拖到Listview到我的表单中并存储它.谁能想到一个简单的主意?

thanx.

Hi,

I want to drag a link from address bar of internet explorer (opera, chrome, ie, firefox etc) to Listview in to my form and store it. Can anyone got easy idea?

thanx.

推荐答案

此处:
http://msdn.microsoft.com/en-us/library/fe5ebfwe.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/za0zx9y0.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/bs2c4z53.aspx [ ^ ].

—SA
Here:
http://msdn.microsoft.com/en-us/library/fe5ebfwe.aspx[^],
http://msdn.microsoft.com/en-us/library/za0zx9y0.aspx[^],
http://msdn.microsoft.com/en-us/library/bs2c4z53.aspx[^].

—SA


感谢您的链接.但是我找到了这样的确切解决方案:

Thank you for the links. But i found my exact solution like that:

private void listBox1_DragEnter(object sender, DragEventArgs e)
{
    e.Effect = DragDropEffects.Copy;
}





private void listBox1_DragDrop(object sender, DragEventArgs e)
{
    string gelen = (string)e.Data.GetData(typeof(string));

    if (!string.IsNullOrEmpty(gelen))
        listBox1.Items.Add(gelen);
}



PS:我正在用我的代码进行URL检查和链接检查...



PS: I am making url check and link check in my codes...


这篇关于将链接从资源管理器拖到列表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆