Im new to this and am building a little tool and at the botom i want to put a copyright notice and a link that when clicked will open there browser and take them to my website?
'Put this in the Declaration/top section of the form:
Code:
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
Private Const SW_SHOWNORMAL = 1
Now add a label named lblLink, put your copyright in it's Caption and add this code to the form:
Code:
Private Sub lblLink_Click()
Dim iReturn As Long
Dim sURL As String
'change this url to your own
sURL = "http://www.MySite.com"
iReturn = ShellExecute(Me.hwnd, "Open", sURL, vbNullString, App.Path, SW_SHOWNORMAL)
End Sub
Edit, added the constant
Last edited by longwolf; Nov 7th, 2008 at 09:37 AM.
As a newer member I ask that if you consider your question to be resolved please help us out by pulling down the Thread Tools menu and clicking the Mark Thread Resolved menu item. That will let everyone know that you have your answer.