| #If Win32 Then 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 #Else Private Declare Function ShellExecute Lib _ "shell.dll" Alias "ShellExecute" _ (ByVal hwnd As Integer, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Integer) As Integer #End If Private Const SW_SHOWNORMAL = 1 'And for the object to click add this: Dim iret As Long iret = ShellExecute(Me.hwnd, _ vbNullString, _ "http://www.whateversite.com", _ vbNullString, _ "c:\", _ SW_SHOWNORMAL) I usually add labels to my apps that look like weblinks (blue text and underlined) and then add the above code, needing only to edit the website address. You can also link to an email address by changing the "http://www.whateversite.com" to "mailto:whoever@whatever.com" |
Connect to URL |
Express News India | Freelance ecommerce web development India