DataObject data = new DataObject();
String url = "数据体模拟";
string contents = "[InternetShortcut]URL=" + url;
logger.info("拖拽URL数据 " + contents);
//"[InternetShortcut]" + Environment.NewLine + "URL=" + url + Environment.NewLine;
Byte[] contentsByteArray = System.Text.Encoding.Default.GetBytes(contents);
MemoryStream contentsStream = new MemoryStream(contentsByteArray);
data.SetData("FileContents", contentsStream);
this.DoDragDrop(data, DragDropEffects.Link);
转载于:https://www.cnblogs.com/viki117/archive/2012/12/06/2805322.html