尝试了很多,最后发现,即使我加入了:this.displayBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.BoxDragDrop); this.displayBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.BoxDragDrop); this.displayBox.DragOver += new System.Windows.Forms.DragEventHandler(this.BoxDragDrop);无论怎么拖动文本,都不触发BoxDragDrop执行!!!越来越郁闷,请大侠帮帮!!!
设置true。
那你怎么还能改变文本内容? 去了readonly=true 看看。
{
}
另外刚试验了下,拖的时候没有触发事件,难道是类里面没提供?
this.displayBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.BoxDragDrop);
this.displayBox.DragOver += new System.Windows.Forms.DragEventHandler(this.BoxDragDrop);无论怎么拖动文本,都不触发BoxDragDrop执行!!!越来越郁闷,请大侠帮帮!!!
this.displayBox.AllowDrop = true;//加入允许拖动
//试试!
/////////////////////////////////////////////////////////////////