ImageLocation

3 posts, 0 answers
  1. Maruf
    Maruf avatar
    2 posts
    Member since:
    Apr 2014

    Posted 06 Sep 2014 Link to this post

    I would like to add a picture button over the internet.

    Example:
    PictureBox1.ImageLocation = "http://www.example.com/image/image.jpg" (png better though)

    I want to:
    RadGalleryItem1.Image = "http://www.example.com/image/image.png" (such as)

    How do I make it?
  2. Maruf
    Maruf avatar
    2 posts
    Member since:
    Apr 2014

    Posted 06 Sep 2014 Link to this post

    Is there no one to answer?
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 10 Sep 2014 Link to this post

    Hello Maruf,

    Thank you for writing.

    You should manually create the image first. For example you can create a method that load images from url:
    private Image LoadImage(string url)
    {
        System.Net.WebRequest request =
            System.Net.WebRequest.Create(url);
     
        System.Net.WebResponse response = request.GetResponse();
        System.IO.Stream responseStream =
            response.GetResponseStream();
     
        Bitmap bmp = new Bitmap(responseStream);
     
        responseStream.Dispose();
     
        return bmp;
    }

    Please let me know if there is something else I can help you with. 
     
    Regards,
    Dimitar
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top