1

I use a .NET richtextbox and I want to have the EnableAutoDragDrop property set to True. This allows user to drag&drop text, rtf and images around etc.

However, I need to process files dropped into the richtextbox myself - I do not want them to be embedded as OLE objects when they are dropped.

How can I overcome this? Is there any way to delete embedded files from richtextbox?

(I've found API DragAcceptFiles which doesn't work for some reason.)

Thanks!

4

2 回答 2

1

Try handling the DragDrop event.

Example.

于 2010-03-17T13:30:38.217 回答
0

你可以试试这篇MSDN 文章。如果您不想锁定文件,可以使用 IO 流。谷歌它,它会解决你的问题。

于 2015-01-03T21:16:21.490 回答