Hi Armin,
I write Some code for you.
Imports System.Net
Imports System.IO
Imports System.Drawing
Module Module1
Sub Main()
' Create a new WebClient instance.
Dim myWebClient As New WebClient
Dim uriString As String = "http://www.google.com/images/logo.gif"
' Download home page data.
Console.WriteLine("Accessing {0} ...", uriString)
' Open a stream to point to the data stream coming from the Web
resource.
Dim myStream As Stream = myWebClient.OpenRead(uriString)
Console.WriteLine(ControlChars.Cr + "Saving Data :" +
ControlChars.Cr)
Dim bt As New Bitmap(myStream)
bt.Save("c:\test.gif")
' Close the stream.
myStream.Close()
End Sub
End Module
If you have any concern on this issue, please post here.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure!
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
From: "Armin Zingler" <az*******@freenet.de>
References: <ex**************@TK2MSFTNGP11.phx.gbl>
Subject: Re: Image
Date: Fri, 12 Dec 2003 21:14:17 +0100
Lines: 19
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#w**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: d8e20.d.pppool.de 80.184.142.32
Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!cpmsftng xa09.phx.gbl!TK2MSFTNGP08.
phx.gbl!TK2MSFTNGP12.phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.languages.vb:163694
X-Tomcat-NG: microsoft.public.dotnet.languages.vb
"IntraRELY" <In*******@yahoo.com> schrieb I need to access an image, for now I am using:
Dim checksSignature As New
Bitmap("C:\Inetpub\wwwroot\rateQuest\images\checks Signature.jpg")
I would like to access it though a url if, that is possible. How do I
do that?
You can create a System.Net.WebClient object and call one of it's methods:
Downloadfile, Downloaddata, OpenRead.
--
Armin
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html