Re: How to create responsive drag and drop experience even if lots of processing is required
- From: "Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 7 Jul 2006 19:46:18 +0200
If you're using the 2.0 runtime take a look at the BackgroundWorkerThread
for doing your decryption. You can put a placeholder on the drop target
while the files are being decrypted and get an asyncronous notification of
the process progress and notification.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Gunnar" <sundfar@xxxxxxxxxxxxxxxxxxx> wrote in message
news:OAx8klcoGHA.2268@xxxxxxxxxxxxxxxxxxxxxxx
I have a winforms application that can encrypt and unencrypt files. I want
to support drag and drop files out to Windows Explorer.
In my current version I unencrypt my files in the MyListview_ItemDrag
Event, build an array of files and call DoDragDrop() with
DataFormats.FileDrop.
This works, but I'm concerned about this architecture. If a user starts to
drag several files from my listView and all of these files are really BIG.
It can take some time to unencrypt these files and place them in a
directory. Meanwhile the application thread is busy and the application
seems unresponsive to the user.
As far as I know, no DragDrop-like Event will trigger in my code when I
drop in an external app like Explorer. So is there no way to postpone the
time-consuming part (unencrypting files) to the DragDrop part when the
user releases the mouse button??
I hope I'm wrong. Any tips, suggestions?
Regards, Gunnar Sundfar
.
- Follow-Ups:
- References:
- Prev by Date: Re: Getting Icon of Files
- Next by Date: Re: Cannot access a disposed object
- Previous by thread: Re: How to create responsive drag and drop experience even if lots of processing is required
- Next by thread: Re: How to create responsive drag and drop experience even if lots of processing is required
- Index(es):
Relevant Pages
|