Results 1 to 4 of 4

Thread: Hyperlink a Picturebox in VB.NET

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2002
    Location
    Houston, TX
    Posts
    28

    Hyperlink a Picturebox in VB.NET

    Hi-

    I want to have an image on a form that opens up a webpage when someone clicks on it. I tried using the LinkLabel control, but the link never worked unless their was a value for the Text property.

    Is there a way to make a picturebox open a webpage when a user clicks it?

    Thanks,
    -Steve
    -Steve

    Steve Parks
    CEO
    Adept Developer Consulting, Inc.
    http://www.adeptdeveloper.com/

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    In the Click event of the picturebox , add this code :

    VB Code:
    1. Process.Start("iexplorer.exe","www.whatever.com")

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2002
    Location
    Houston, TX
    Posts
    28
    How do I find the path to IE? Is there an Environment variable or anything for that?

    -Steve
    -Steve

    Steve Parks
    CEO
    Adept Developer Consulting, Inc.
    http://www.adeptdeveloper.com/

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    This way should work fine with both Win2000 and XP but I'm not so sure about earlier versions of windows . So , it doesn't need any specific path to run explorer .

    VB Code:
    1. Process.Start("IEXPLORE", "www.address.com")

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