asynch + ui

Discussion in 'Microsoft Dot NET Framework Forms' started by Guest, Nov 17, 2004.

  1. Guest

    Guest Guest

    Hi,

    I need help on how to check and wait if an async
    ....
    DownloadDelegate download = new DownloadDelegate(DownloadFile);
    IAsyncResult aResult = download.BeginInvoke(null, null); // start download
    asynch.
    aResult.AsyncWaitHandle.WaitOne(); // wait for download completes
    download.EndInvoke(aResult); // download all files are done
    ....

    But now I am having the problem with the winform - it is locked (because of
    the WaitOne()).

    So, how do I wait and see if an async. operation is done and not locking UI
    thread?

    Thanks in advance,
    -P
     
    Guest, Nov 17, 2004
    #1
    1. Advertisements

  2. Looks like you need a callback

    http://support.microsoft.com/default.aspx?scid=kb;en-us;315582

    Andy Mortimer [MS]
    Please do not send email directly to this alias. This alias is for
    newsgroup purposes only

    This posting is provided "AS IS" with no warranties, and confers no rights.
    OR if you wish to include a script sample in your post please add "Use of
    included script samples are subject to the terms specified at
    http://www.microsoft.com/info/cpyright.htm"
     
    Andy Mortimer [MS], Nov 18, 2004
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Todd

    Thread vs Asynch Remote call

    Todd, Feb 6, 2004, in forum: Microsoft Dot NET Framework Forms
    Replies:
    2
    Views:
    207
  2. Lance Johnson

    asynch call back and adding controls

    Lance Johnson, Mar 2, 2005, in forum: Microsoft Dot NET Framework Forms
    Replies:
    1
    Views:
    212
    Joshua Flanagan
    Mar 3, 2005
  3. rmx

    Asynch WebRequest & WinForms

    rmx, Jun 30, 2005, in forum: Microsoft Dot NET Framework Forms
    Replies:
    2
    Views:
    252
    Joerg Jooss
    Jul 1, 2005
Loading...