473,394 Members | 1,735 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,394 software developers and data experts.

Displaying a GIF File from a URI Location

I got the following error when I ran the below code

Error: URI formats are not supported

DilbertPic = Dilbert.DailyDilbertImagePath(WebService call
(dilbertPic = "http://www.dilbert.com/comics/dilbert/archive/images/dilbert20182998040217.gif"
(Picture Box)picViewer.Image = Image.FromFile(DilbertPic

How can I work with the GIF files that are located on the Internet

Thanks for your help

Jul 21 '05 #1
4 1234
Download them to local temporary storage?
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Jason" <ja**********@agedwards.com> wrote in message
news:B3**********************************@microsof t.com...
I got the following error when I ran the below code.

Error: URI formats are not supported.

DilbertPic = Dilbert.DailyDilbertImagePath(WebService call)
(dilbertPic = "http://www.dilbert.com/comics/dilbert/archive/images/dilbert20182998040217.
gif") (Picture Box)picViewer.Image = Image.FromFile(DilbertPic)

How can I work with the GIF files that are located on the Internet?

Thanks for your help.

Jul 21 '05 #2
Hello,

Thanks for your post. I agree with Klaus that you should download the GIF
with the specified URI to a local file. Please use the
WebClient.DownloadFile method:

WebClient.DownloadFile Method
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemnetwebclientclassdownloadfiletopic.asp

Please feel free to let me know if you have any problems or concerns.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #3
I wasn't able to open your link. Can you provide some sample code on
how to download the file?

Jason Carter

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #4
Hello Jason,

Thanks for your reply. Please refer to the following code snippet:

//---------------code snippet--------------
string remoteUri = "http://www.contoso.com/library/homepage/images/";
string fileName = "ms-banner.gif", myStringWebResource = null;
// Create a new WebClient instance.
WebClient myWebClient = new WebClient();
// Concatenate the domain with the Web resource filename.
myStringWebResource = remoteUri + fileName;
Console.WriteLine("Downloading File \"{0}\" from \"{1}\" .......\n\n",
fileName, myStringWebResource);
// Download the Web resource and save it into the current filesystem folder.
myWebClient.DownloadFile(myStringWebResource,fileN ame);
//----------------end of--------------------------

In addition, I double checked the link in my previous email, it works. It
may be wrapped to two lines on your side.

I am standing by for your result.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #5

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

Similar topics

5
by: TG | last post by:
Dear PHP Group, I have two forms that are used to collect user information. The first one takes user inputted values such as fullname, city, address etc. I want these values to display in the...
2
by: shyamal | last post by:
I want to display memory content using C++ on LINUX. For example, the user may ask to display 256 bytes from 0x1000ff00. The problem is , if any location is invalid, the program will coredump...
7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
0
by: Fronky | last post by:
Hope someone can help. I am still learning, so no laughing please. I am displaying records from a database using Response.Write(""); instead of the usual datagrid method. I am doing it this way...
4
by: pmud | last post by:
Hi, I have an image which resides on a different server...on data server. I am developing on Development server. When I use the image URLin my ASP.Net web page as ...
1
by: detho | last post by:
Hi everyone... I am currently developing a streaming movie front-end for my companies' intranet. The script is done with PHP on the back-end and HTML and CSS for the front-end. Basically, the...
5
by: debbiedchang | last post by:
Hi, I have a custom user login authentication page. There are times when the login authentication succeeds, but before I redirect to the home page, I want to display a popup with a warning message...
1
by: kiran520 | last post by:
Hi Iam having problem while displaying menu in ie7. Code for displaying menu is function mmLoadMenus() { if (window.mm_menu_0308002013_0) return; window.mm_menu_0308002013_0...
19
by: Rocky86 | last post by:
Hi ppl I need help with my php basically I manage to get my php to display the uname that matches the sql condition however it only return 1 record when there are 2 record that match the condition...
1
by: ColebyA | last post by:
Hi I am using ASP and HTML to process a form. The first form calls another page to process the data. When the page processes it redirects to a page confirming submission. I want to display the...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.