Click here to Skip to main content
15,906,816 members
Home / Discussions / C#
   

C#

 
Questiondll comparison Pin
Ananthalvan21-Jul-06 23:20
Ananthalvan21-Jul-06 23:20 
AnswerRe: dll comparison Pin
Nader Elshehabi22-Jul-06 2:12
Nader Elshehabi22-Jul-06 2:12 
GeneralRe: dll comparison Pin
Ananthalvan25-Jul-06 4:46
Ananthalvan25-Jul-06 4:46 
GeneralRe: dll comparison Pin
Nader Elshehabi27-Jul-06 3:29
Nader Elshehabi27-Jul-06 3:29 
QuestionUrgent Help Required in Databindings [modified] Pin
Vinu M21-Jul-06 22:48
Vinu M21-Jul-06 22:48 
QuestionVideo Play Out(Please Help Me Urgent) Pin
shakil ahmed21-Jul-06 21:05
shakil ahmed21-Jul-06 21:05 
QuestionDrag Drop from ListView to Explorer Pin
fperugini21-Jul-06 13:36
fperugini21-Jul-06 13:36 
AnswerRe: Drag Drop from ListView to Explorer Pin
fperugini22-Jul-06 4:13
fperugini22-Jul-06 4:13 
more info...

The sample from blog.joycode.com should work, but I guess I don't understand the order events happen. If you look at the code below, I adapted the custom DataObject for my application based on what was in the article. When you drop the items, GetData() gets called multiple times. My custom UnzipFiles() gets called, and the files get extracted to the temp folder where the original temp files were created when I first start the drag from the list. But it seems that it copies the zero length files before the extracted versions get created. It's definitely a timing issue. Confused | :confused:

public class ShellDataObject: DataObject
{
     //This flag is used to prevent multiple callings to "GetData" when dropping in Explorer.

     private bool downloaded = false;
     private DlgExtract _dlg;

     public override object GetData(String format)
     {
          Object obj = base.GetData(format);

          if (System.Windows.Forms.DataFormats.FileDrop == format && !InDragLoop() && !downloaded)

          {
              _dlg.UnzipFiles(System.IO.Path.GetTempPath(), _dlg.ZipContentsList.SelectedItems);

               downloaded = true;
          }

          return obj;
     }

     public DlgExtract BaseDialog
     {
        set { _dlg = value; }
     }

     private bool InDragLoop()
     {
          return (0 != (int)GetData(ShellClipboardFormats.CFSTR_INDRAGLOOP));
     }
 }



GeneralRe: Drag Drop from ListView to Explorer Pin
Judah Gabriel Himango22-Jul-06 6:42
sponsorJudah Gabriel Himango22-Jul-06 6:42 
AnswerRe: Drag Drop from ListView to Explorer Pin
fperugini22-Jul-06 8:26
fperugini22-Jul-06 8:26 
GeneralRe: Drag Drop from ListView to Explorer Pin
Judah Gabriel Himango22-Jul-06 12:12
sponsorJudah Gabriel Himango22-Jul-06 12:12 
Question1st chance exceptions in VS 2005 Pin
Ami Bar21-Jul-06 11:07
Ami Bar21-Jul-06 11:07 
AnswerRe: 1st chance exceptions in VS 2005 Pin
Nader Elshehabi22-Jul-06 2:09
Nader Elshehabi22-Jul-06 2:09 
GeneralRe: 1st chance exceptions in VS 2005 Pin
Ami Bar22-Jul-06 4:45
Ami Bar22-Jul-06 4:45 
GeneralRe: 1st chance exceptions in VS 2005 Pin
Nader Elshehabi22-Jul-06 8:05
Nader Elshehabi22-Jul-06 8:05 
GeneralRe: 1st chance exceptions in VS 2005 Pin
Ami Bar22-Jul-06 9:08
Ami Bar22-Jul-06 9:08 
GeneralRe: 1st chance exceptions in VS 2005 Pin
Nader Elshehabi22-Jul-06 10:52
Nader Elshehabi22-Jul-06 10:52 
Questioncompiler details Pin
waheed awan21-Jul-06 10:57
waheed awan21-Jul-06 10:57 
AnswerRe: compiler details Pin
Ed.Poore21-Jul-06 12:14
Ed.Poore21-Jul-06 12:14 
GeneralRe: compiler details Pin
Paul Conrad21-Jul-06 12:22
professionalPaul Conrad21-Jul-06 12:22 
AnswerRe: compiler details Pin
BoneSoft22-Jul-06 5:55
BoneSoft22-Jul-06 5:55 
QuestionRich text box Pin
waheed awan21-Jul-06 10:42
waheed awan21-Jul-06 10:42 
AnswerRe: Rich text box Pin
Ed.Poore21-Jul-06 12:26
Ed.Poore21-Jul-06 12:26 
QuestionWhy the following condition is never met? Pin
xkx3221-Jul-06 10:06
xkx3221-Jul-06 10:06 
AnswerRe: Why the following condition is never met? Pin
Dustin Metzgar21-Jul-06 10:38
Dustin Metzgar21-Jul-06 10:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.