1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Download An Image From A URL In background in C# WPF

Discussion in 'C#' started by THT, Oct 25, 2010.

  1. THT

    THT New Member

    Joined:
    Sep 29, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi, I would like to download images in the background from an URL. I currently had a program which is downloading an image from a URL. However the application i created will "freeze" until all the image had be downloaded.

    Hence, I am looking for a way to download images from an URL in the background. So i would be able to continue to use the program while it download.

    I am new to C# (WPF) and I am still learning. Hope you guys can give me some suggestion or links for references. Thank you


    Thank you very much!
    Janet
     
  2. dotNet Zombie

    dotNet Zombie New Member

    Joined:
    Aug 28, 2010
    Messages:
    34
    Likes Received:
    10
    Trophy Points:
    0
    Occupation:
    .Net Developers
    Location:
    Minnesota
    Home Page:
    to do that, just create a nother thread to fire the method that is downloading the Images.

    Code:
    Thread firstThread = new Thread( new ThreadStart( MethodA) );
    
    Code:
     public void MethodA()
          {
             // Do Nothing
          }
    
    
     
    THT likes this.
  3. THT

    THT New Member

    Joined:
    Sep 29, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi dotNet Zombie,

    Thank you for the prompt reply. I am trying out the code :) Will let u know if it is working.

    Regards
    THT
     
  4. THT

    THT New Member

    Joined:
    Sep 29, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hi, it is able to work :) thank you very much!!
     

Share This Page