Results 1 to 2 of 2

Thread: hyperlinks in message boxes

  1. #1

    Thread Starter
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 2000
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604

    Thumbs down

    hi,

    can any one help me, i have a message box and i have a link to my website in the text, is there any way in which this text can become a hyperlink, so people can click on it and go to my site ?

    Thanks

    Merlin ?

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

    [Galahtech.com] | [My Site] | [Fishsponge] | [UnixForum.co.uk]

  2. #2
    Fanatic Member RealisticGraphics's Avatar
    Join Date
    Jul 1999
    Location
    Arkansas
    Posts
    655
    Can't think of any way to actually put the Hyperlink in the messagebox, but you can either build your own form or have the browser start when the user clicks OK on the messagebox.

    Code is as follows:

    Dim FileName As String, Dummy As String
    Dim BrowserExec As String * 255
    Dim RetVal As Long
    Dim FileNumber As Integer

    Const SW_SHOWNORMAL = 1

    Sub Link_Click()
    BrowserExec = Space(255)
    FileName = App.Path & "\temphtm.HTM"

    FileNumber = FreeFile() ' Get unused file number

    Open FileName For Output As #FileNumber ' Create temp HTML file
    Write #FileNumber, " <\HTML>" ' Output text
    Close #FileNumber ' Close file

    ' Then find the application associated with it.
    RetVal = FindExecutable(FileName, Dummy, BrowserExec)
    BrowserExec = Trim$(BrowserExec)
    ' If an application is found, launch it!
    If RetVal <= 32 Or IsEmpty(BrowserExec) Then ' Error
    MsgBox "Could not find browser.", vbCritical, "HyperPad"
    Else
    RetVal = ShellExecute(MDIForm1.hwnd, "open", BrowserExec, "www.realisticgraphics.com", Dummy, SW_SHOWNORMAL)
    If RetVal <= 32 Then
    MsgBox "Webpage could not be opened.", vbCritical, "HyperPad"
    End If
    End If

    Kill FileName
    End Sub

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