PC Review


Reply
Thread Tools Rate Thread

Displaying a GIF File from a URI Location

 
 
=?Utf-8?B?SmFzb24=?=
Guest
Posts: n/a
 
      17th Feb 2004
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

 
Reply With Quote
 
 
 
 
Klaus H. Probst
Guest
Posts: n/a
 
      18th Feb 2004
Download them to local temporary storage?


--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Jason" <(E-Mail Removed)> wrote in message
news:B32DF318-5A01-4413-AD81-(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
Tian Min Huang
Guest
Posts: n/a
 
      18th Feb 2004
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.

 
Reply With Quote
 
Jason Carter
Guest
Posts: n/a
 
      18th Feb 2004
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!
 
Reply With Quote
 
Tian Min Huang
Guest
Posts: n/a
 
      19th Feb 2004
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,fileName);
//----------------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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PST file location overrides OST file location? Jeff Vandervoort Microsoft Outlook Installation 9 19th May 2011 11:21 AM
Format the file location based on server location no the mapped dr BZeyger Microsoft Access 1 20th Feb 2009 04:38 AM
Displaying an image from a remote location with a html link =?Utf-8?B?Q2hyaXMgUmljZQ==?= Microsoft Access Forms 0 16th Dec 2005 01:42 AM
Displaying a map location? Kevin Microsoft C# .NET 1 18th Nov 2003 06:04 AM
displaying photos from a LAN location Joel Montalvo Microsoft Access Getting Started 1 2nd Jul 2003 10:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:25 AM.