How to get an image from web and resized for Pocket PC??? HELP!

D

Daniel Friend

I am trying to get an image from the net to pocket pc. Here is my VB code
for my main app... I just need to get this to work and image to be resize
for pocket pc.

Public Function LoadWebImage(ByVal ImageURL As String) As Image
Dim objImage As MemoryStream
Dim objwebClient As WebClient
Dim sURL As String = Trim(ImageURL)
Dim bAns As Boolean
Try
If Not sURL.ToLower().StartsWith("http://") Then sURL = "http://" &
sURL
Application.DoEvents()
objwebClient = New WebClient
objImage = New MemoryStream(objwebClient.DownloadData(sURL))
Application.DoEvents()
Return Image.FromStream(objImage)
Catch ex As Exception
End Try
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top