CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 1998
    Posts
    23

    Foms and hyperlinks



    Any one tell me how to attatch a hyperlink to a form

    say somthing like.


    my web page


    Which will link to a web page in explorer or whatever browser there is available.


    thanks.

    (You never know I might find the solution!?? 1st)




  2. #2
    Join Date
    Feb 1999
    Posts
    11

    Re: Foms and hyperlinks



    'DECLARATION:

    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

    Private Const SW_SHOWNORMAL = 1


    'FOR WEBPAGE:

    Private Sub Label12_Click()'or whatever control activates it command button etc.

    Dim lRet As Long

    Dim sText As String

    sText = "http://www.mathouse.com"

    lRet = ShellExecute(hwnd, "open", sText, vbNull, vbNull, SW_SHOWNORMAL)

    If lRet >= 0 And lRet = 0 And lRet <= 32 Then

    MsgBox "Unable to access Web browser !"

    End If

    End Sub



  3. #3
    Join Date
    Nov 1998
    Posts
    23

    Re: Foms and hyperlinks(thanks! Alot!! ) :)



    Thanks!!!! for that Code!!

    You know it solved my prevous problem too!!

    and made alot of other tasks alot easier.


    Again


    THANKS!!!

    again!!


    Christopher.



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

Featured