#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Sheffield, UK
    Posts
    94
    Rep Power
    11

    getting VB.net to open a web page on a button click


    Hi guys,

    Sorry for sounding REALLY dumb, but can anyone help me with this problem?

    I've got a form, with several buttons on. What I want to happen, is that when the user clicks on a button, a corresponding web page should appear (either in IE or in a vb form - dont really care at this stage).

    Currently, im clicking on the button, and inputting what i thought was the code, but it comes up saying that my webpage isnt defined.

    So, could any of you kind folk help my predicament?

    Thanks in advance.

    Chris
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Windsor ON, Canada
    Posts
    462
    Rep Power
    13
    Code:
    System.Diagnostics.Process.Start("http://www.website.com")
    this can be used to open any file in the default program for that extension. this is similar to the ShellExecute API call.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Sheffield, UK
    Posts
    94
    Rep Power
    11
    Would that statement still work for files such as word documents, rich text files, bitmaps etc?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    109
    Rep Power
    12
    Originally posted by nopoints
    This can be used to open any file in the default program for that extension.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    1
    Rep Power
    0

    Question rights on Windows


    Hi,

    It works beautiful, but when the adminstrator of a network set the rights of users like they may not open webpages from other programs then IE or NETSCAPE it doesn't.

    Do someone have a solution for this problem?

    Gr
    Bommetje

IMN logo majestic logo threadwatch logo seochat tools logo