|
-
Nov 25th, 2005, 06:09 AM
#1
Thread Starter
New Member
Saving a Webbrowser control image to disk
I'm not a VB programmer but I am attempting a little utility program. My program uses a webbrowser control and retrieves an image from an internet webpage via a direct url. What I want to do is save that image every X minutes to a file on my PC. It's an animated gif (radar image). I would like to save it as a unique name each time, so that I have a running history of all the images (the webpage updates once every hour).
Any ideas out there?
Here is my source (so far) that I hacked from another program (written in VB6)....
Const Flags = 0
Const Target = ""
Const Headers = ""
Dim PostDataSet() As Byte
Private Sub Form_Load()
SendMessage
Me.Show
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
'SaveAsFile WebBrowser1.Document
'Unload Me
End Sub
Function SaveAsFile(ByVal htmlPage As HTMLDocument)
'???? how to save the image as a file
End Function
Function SendMessage()
WebBrowser1.RegisterAsBrowser = True
WebBrowser1.Navigate "http://www.landi.ch/meteoftp/radarbild/radar.gif", Flags, Target, PostDataSet, Headers
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|