Results 1 to 4 of 4

Thread: webbrowser & images

  1. #1

    Thread Starter
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545

    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?

  2. #2
    Addicted Member mr_metal_hed's Avatar
    Join Date
    Aug 2002
    Location
    NC
    Posts
    149
    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:
    1. Private Sub Timer1_Timer()
    2.  
    3. 'interval at 200 - tweak at will
    4. Static Last_Text As String
    5.  
    6. If Clipboard.GetText <> Last_Text Then
    7.     Last_Text = Clipboard.GetText
    8.     MsgBox Last_Text 'add to download list, etc
    9. End If
    10.  
    11. End Sub

  3. #3

    Thread Starter
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545
    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?

  4. #4
    Addicted Member mr_metal_hed's Avatar
    Join Date
    Aug 2002
    Location
    NC
    Posts
    149
    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
  •  



Click Here to Expand Forum to Full Width