PDA

Click to See Complete Forum and Search --> : label link


Nov 5th, 2000, 01:29 AM
how can I make a label to look like a link?

Nov 5th, 2000, 01:39 AM
Set Label's ForeColor to Blue.
Label1.ForeColor = vbBlue

And use the ShellExecute api function to make a link.

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

Public Const SW_SHOWNORMAL = 1


Usage

ShellExecute Me.hwnd, vbNullString, "http://www.vb-world.net", _
vbNullString, "c:\", SW_SHOWNORMAL

KENNNY
Nov 5th, 2000, 01:46 PM
also:
make it underlines
and make it change colour in label's mouseover event