|
-
Feb 3rd, 2004, 02:57 PM
#1
Thread Starter
Frenzied Member
webbrowser & images
Hi,
What I would like to do is this.
Using a webbrowser control, navigate to a page of my choice, then every time I right click on an image either (whichever is easier)
a) automatically download that file to a specific location and filename (determined at runtime)
b) display a popup menu which gives me an option to download
I guess basically I'm asking, how do you determine the filename of an image you right click on, in the webbrowser control.
Any ideas?
-
Feb 3rd, 2004, 06:51 PM
#2
Addicted Member
This is just an idea and it may be nothing close to helping you. Instead of a new option 'download' on the right click shortcut, why not just select 'copy shortcut'? Then all you have to do is use a timer to monitor the clipboard and take actions if the clipboard data has changed since the last time you checked.
VB Code:
Private Sub Timer1_Timer()
'interval at 200 - tweak at will
Static Last_Text As String
If Clipboard.GetText <> Last_Text Then
Last_Text = Clipboard.GetText
MsgBox Last_Text 'add to download list, etc
End If
End Sub
-
Feb 3rd, 2004, 07:44 PM
#3
Thread Starter
Frenzied Member
Because copy shortcut only works with links, or images that are links. Any images that are not links do not give you the option to copy shortcut.
Any other ideas?
-
Feb 3rd, 2004, 07:55 PM
#4
Addicted Member
I see, my mistake. I assumed that you wanted image links. But this still may work... because the clipboard also accomodates images. Just select 'Copy' on the menu instead of 'Copy Shortcut'. It would still be a matter of monitoring what you had and comparing with what you have, then saving accordingly. I can't think right out how to compare the images or how to save straight from the clipboard. It sound to me like a possible solution, though maybe not the best.
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
|