|
-
July 15th, 2010, 09:44 AM
#1
Emulating Save Image As in Web Browser Control
Hi,
I've been searching for awhile but i can't find an answer. How do you emulate the save image as in IE in a webbrowser control? I already have the element("src") but i can't figure out how to download it WITH a dialog box.
Thanks,
Arjun
-
July 15th, 2010, 11:59 PM
#2
Re: Emulating Save Image As in Web Browser Control
Friends time (yahoo, google, ask, answers, bing) vb6 URLDownloadToFile API...
Okay, you have the source http...jpg/bmp/tga/png/etc then all you need is the common dialog control with the showsave method to collect the destination file name. Once you have that, execute the API...
Good Luck
-
July 16th, 2010, 11:03 AM
#3
Re: Emulating Save Image As in Web Browser Control
Hi, I've toyed around with the api and seem to have gotten it to work, but what I don't understand is how to get the directory path **with** the correct extension. Could you please post some sample code? I would appreciate it if you could.
-
July 16th, 2010, 12:50 PM
#4
Re: Emulating Save Image As in Web Browser Control
What are you having problems with? The local machine path? use app.path in vb6
Code:
msgbox "app.path & \folder"
-
July 17th, 2010, 01:05 AM
#5
Re: Emulating Save Image As in Web Browser Control
Okay, you have the URL to the image right? So, you put that into a string variable...
MyString = ...
Then you will need a couple of dynamic arrays declared. One for the CD.FileName and one for the CD.Filter. (Dim E() As String, N() As String)
Split on the "/" for retrieving the filename, and split on the "." for the extension (use the UBound Function...)...
Give it a try and if you have problems, post your code.
Good Luck
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
|