This post explains how we can directly drag and drop text files in Windows Form. so whenever you drag and drop the text files it will be open in the Application. Let's Create a new new C# Windows Form Application project and name it as Drag and Drop.
Right Click on the Windows Form and select "Properties".
In the Properties window under behaviour set AllowDrop to True.
Then drag and drop Richtextbox to the windows form and create a form events for dragenter and DragandDrop the paste the following code.
Download Source Code
No comments :
Post a Comment