VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Adding Hyperlink Using the Label Control *** incredibly simplified *** less than half the code as o

by mazzacom (1 Submission)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 13th February 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Adding Hyperlink Using the Label Control *** incredibly simplified *** less than half the code as others

API Declarations


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

Rate Adding Hyperlink Using the Label Control *** incredibly simplified *** less than half the code as o



' then paste this code in
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = &H80000012
Label1.FontUnderline = False
End Sub

Private Sub Label1_Click()
NewUrl = Label1.Caption
ShellExecute hwnd, "open", NewUrl, vbNullString, vbNullString, conSwNormal
End Sub

Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = &HFF0000
Label1.FontUnderline = True
End Sub

Private Sub Text1_Change()
Label1.Caption = Text1.Text
End Sub


Download this snippet    Add to My Saved Code

Adding Hyperlink Using the Label Control *** incredibly simplified *** less than half the code as o Comments

No comments have been posted about Adding Hyperlink Using the Label Control *** incredibly simplified *** less than half the code as o. Why not be the first to post a comment about Adding Hyperlink Using the Label Control *** incredibly simplified *** less than half the code as o.

Post your comment

Subject:
Message:
0/1000 characters