CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2013
    Posts
    22

    How to get rid of "Not Responding" (App Freezing) while copying a large size of data

    How to get rid of "Not Responding" (App Freezing) while copying
    Hi everyone,

    I'd like to get rid of "Not Responding" (App Freezing) while copying a large size of file (over 500 MB).

    I tried to use the below options to perform my copy operation :

    - FileSystemObject (FSO) 'No recommended for large amount of transfer
    - CopyFile and CopyFileEx (API)
    - MoveFile and MoveFileEx (API)
    - SHFileOperation and IFileOperation (API)


    unfortunately all of them are still giving me that issues of "Not Responding / App Freezing" if I click on the Form when copy is in progress.




    Any help appreciated!

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How to get rid of "Not Responding" (App Freezing) while copying a large size of d

    You need to pick and implementation that gives you a progress callback. MoveFileEx has this functionality as well as the ShFileOperation replacement IFileOperation (using the Advise method).

    Within the callbacks, you'll need to make a call to DoEvents(). This will cause the message pump in the application to process messages so you won't get the "Not responding..." message.

  3. #3
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: How to get rid of "Not Responding" (App Freezing) while copying a large size of d

    This article:
    http://www.codeguru.com/vb/controls/...le.php/c12917/

    Will help you copy large files without problems.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured