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?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Todd

    Thread vs Asynch Remote call

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

    asynch call back and adding controls

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

    Asynch WebRequest & WinForms

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

Share This Page