M
Me
Hello,
I am currently undertaking development for a Pocket PC 2003 PDA using VB.NET
2003.
I have developed a VB.NET application under the .Net Framework that allows
me to programatically download an image from a website and store it on my
local computer.
My problem is that I have not been able to figure out how to do so via the
..Net Compact Framework.
Below is a code snipet of the VB.NET code (NON Compact Framework).
Imports System.Xml
Imports System.Data
Imports System.Net
....
Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSearch.Click
Dim strFilename As String
Dim strWebResource As String
strFilename = Application.StartupPath & "\images\" & txtinfo.Text & ".jpg"
txtImageFilename.Text = strFilename
strWebResource = txtImage.Text
DownloadImage(strWebResource, strFilename)
DisplayImage(strFilename)
End Sub
Private Sub DownloadImage(ByVal strWebWebResource As String, ByVal
strFilename As String)
Dim myWebClient As New WebClient
myWebClient.DownloadFile(strWebWebResource, strFilename)
End Sub
Private Sub DisplayImage(ByVal strFilename As String)
picImage.Image = Image.FromFile(strFilename)
picImage.Show()
End Sub
Can anyone tell me how I may accomplish the same in the .NET Compact
Framework?
Thanks,
Me
I am currently undertaking development for a Pocket PC 2003 PDA using VB.NET
2003.
I have developed a VB.NET application under the .Net Framework that allows
me to programatically download an image from a website and store it on my
local computer.
My problem is that I have not been able to figure out how to do so via the
..Net Compact Framework.
Below is a code snipet of the VB.NET code (NON Compact Framework).
Imports System.Xml
Imports System.Data
Imports System.Net
....
Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSearch.Click
Dim strFilename As String
Dim strWebResource As String
strFilename = Application.StartupPath & "\images\" & txtinfo.Text & ".jpg"
txtImageFilename.Text = strFilename
strWebResource = txtImage.Text
DownloadImage(strWebResource, strFilename)
DisplayImage(strFilename)
End Sub
Private Sub DownloadImage(ByVal strWebWebResource As String, ByVal
strFilename As String)
Dim myWebClient As New WebClient
myWebClient.DownloadFile(strWebWebResource, strFilename)
End Sub
Private Sub DisplayImage(ByVal strFilename As String)
picImage.Image = Image.FromFile(strFilename)
picImage.Show()
End Sub
Can anyone tell me how I may accomplish the same in the .NET Compact
Framework?
Thanks,
Me