Discussion:
hai I want create link to web in visual basic
(too old to reply)
mohanbeela
2004-11-14 22:04:59 UTC
Permalink
hai,

My problem is to link from the VB application to specified web address when
the user clicks on a button. How can i do this simply in visual basic6.
Please help me solve this problem. Thanks in advance to all of you.

Mohan Beela
Tony Proctor
2004-11-15 13:13:20 UTC
Permalink
Or, being slightly more generic, the following is an event handler for a
label called lblUrl:

Private Sub lblUrl_Click()
If Len(lblUrl.Caption) > 0 Then
ShellExecute Me.hwnd, "open", lblUrl.Caption, vbNullString, "", 0
End If
End Sub

Don't forget to set the label's font to look like a hyperlink, e.g. blue and
underlined.

Also, if you can find a hand.cur file defining a "hand" cursor for
hyperlinks, then you can set it in the label's MouseIcon property. A mouse
hovering over the link then behaves properly.

Tony Proctor
Post by mohanbeela
hai,
My problem is to link from the VB application to specified web address when
the user clicks on a button. How can i do this simply in visual basic6.
Please help me solve this problem. Thanks in advance to all of you.
Mohan Beela
Loading...