Nezir Zahirović

Get image from http URI to panel.Background

C# : // Create the requests.
WebRequest requestPic = WebRequest.Create(picUri);
WebResponse responsePic = requestPic.GetResponse();
Image webImage = Image.FromStream(responsePic.GetResponseStream());
pnlMapa.BackgroundImage = webImage;
VB.NET :
' Create the requests.
Dim requestPic As WebRequest = WebRequest.Create(picUri)
Dim responsePic As WebResponse = requestPic.GetResponse()
Dim webImage As Image =
Image.FromStream(responsePic.GetResponseStream())
pnlMapa.BackgroundImage = webImage


With those few line of code you can very fast get any
Internet image in your (application web or windows) :


SHARE
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment