473,385 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Windows Application with Image from URL

Here's my problem. I have a Windows application that has a picturebox. I
need to populate the picturebox from a image from a URL. Does someone know
how to do this? I don't have the luxury of the imageURL property that I
have from a web application.

thanks in advance.
Scott
Nov 17 '05 #1
2 4211
Use the WebClient class to grab the image and put it into your picture box.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Scott Durrett" <kc****@hotmail.com> wrote in message
news:ev**************@TK2MSFTNGP10.phx.gbl...
Here's my problem. I have a Windows application that has a picturebox. I
need to populate the picturebox from a image from a URL. Does someone
know how to do this? I don't have the luxury of the imageURL property
that I have from a web application.

thanks in advance.
Scott

Nov 17 '05 #2
Hi,

Use WebRequest to download the image, and create the imag from the stream
you get:

Bitmap b = new Bitmap( WebRequest.Create(
"http://....").GetResponse().GetresponseSTream() );
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Scott Durrett" <kc****@hotmail.com> wrote in message
news:ev**************@TK2MSFTNGP10.phx.gbl...
Here's my problem. I have a Windows application that has a picturebox. I
need to populate the picturebox from a image from a URL. Does someone
know how to do this? I don't have the luxury of the imageURL property
that I have from a web application.

thanks in advance.
Scott

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Andre Grumbach | last post by:
Hi NG, I have a little Problem. I make a normal HTML page which does following: When I click the Button Submit, I send some fields to the Server back. Here the Stream that my Browser...
8
by: Ron Holmes | last post by:
I want to place a background image on a windows form. Is there a way to prevent the image from Tiling without using an image box resized to the size of the form? I am using Visual Studio 2003...
5
by: VMI | last post by:
I have a BMP image (the form is also in PDF) that contains a scanned copy of a paper form that we need to fill out. Is it possible to use this image in my application so that the application can...
9
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am...
6
by: Shimon Sim | last post by:
Hi 1) Is it possible to force browser to open image in default windows application? That is what specifies in Folder Options for jpg extension. 2) Also if the 1) is possible is it possible to...
2
by: domtam | last post by:
Hi there. My goal is to write a windows service that can act as HTTP Request server. How can I do that? I know that I can use ASP.NET to develop a web site to achieve this purpose, i.e....
2
by: =?Utf-8?B?UmFndQ==?= | last post by:
Hi I have developed a basic windows control an dll in vb.net (windows control library) That contol is used to load image to a picture box. The control has a pciture box and a property by name...
5
by: =?Utf-8?B?dmlzaHJ1dGg=?= | last post by:
This code works fine in Windows Application. In Windows Application, I am able to zip the image files properly and it totally contains 900MB My problem is the same code which I used in my Windows...
8
by: inpuarg | last post by:
I 'm developing a c# (.net 2.0) windows forms application and in this application i want to connect to a java servlet page (HTTPS) (which is servlet 2.4 and which may be using Web Based SSO Sun...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.