VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Create links from labels

Paul Spiteri  (3 Submissions)   Internet/HTML   Visual Basic 3.0   Beginner   Wed 3rd February 2021

Turns labels into links which when clicked, load the contents of the caption as the URL into a webbrowser.

Inputs
Private Sub Form_Load() MakeLink Label1, Startup End Sub Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) MakeLink Label1, FormMove End Sub Private Sub Label1_Click() MakeLink Label1, Click, Me End Sub Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) MakeLink Label1, LinkMove End Sub

API Declarations
Public Enum OpType
Startup = 1
Click = 2
FormMove = 3
LinkMove = 4
End Enum
Dim Clicked As Boolean
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

Rate Create links from labels (5(5 Vote))
Create links from labels.bas

Create links from labels Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters