Results 1 to 2 of 2

Thread: Jumping to URLs

  1. #1

    Thread Starter
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    I know this is probably simple, but I've just never done it. I've got a database that contains a list of URLs. What control do I use in VB to display them so that my user can jump to the URL by double-clicking it?

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    You can use any control to display the URLs, the question is how do you launch the Browser and send it to that URL, in which case you can use the ShellExecute API, ie.
    Code:
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    
    ShellExecute 0&, "OPEN", sURL, "", "", 1
    If you want something more like the Hyperlinks on a webpage, feel free to checkout the URL control I've put together, it's Freeware and it offers some customizable features, you just plop it on your form, like a label.


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