How to Retrieve image from Windows Live Album

namespace WindowsFormsApplication1
{
    using System;
    using System.ComponentModel;
    using System.Net;
    using System.Windows.Forms;

    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string url =  http://public.blu.livefilestore.com/xyz/012.jpg";
            WebClient client = new WebClient();
            client.Proxy.Credentials =  new NetworkCredential("uname", "upwd", "udomain");
            client.DownloadFileCompleted += 
               new AsyncCompletedEventHandler(client_DownloadFileCompleted);
            client.DownloadFile(new Uri(url), @"c:localfile.jpg");
        }

        void client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
        {
            MessageBox.Show("Download completed");
        }
    }
} 
Share

Leave a Reply

Your email address will not be published. Required fields are marked *