-
I have added my e-mail address as a label in the 'about' form. With MouseMove method it changes color to indicate a clickable element. On click, I want it to connect to the default e-mail composer (e.g. Outlook Express) but don't know how! Can anyone help?
-
This was in another thread and was originally posted by Stever2003:
Code:
Private Const SW_SHOWNORMAL = 1
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 Sub Command1_Click()
Dim strThing As String
strThing = Text1.Text
'strThing can be anything: a file, a webpage, or an email address
Dim Success As Long
Success = ShellExecute(0&, vbNullString, strThing, vbNullString, "C:\", SW_SHOWNORMAL)
End Sub
You basically shell to the default mail handler (or whatever is set to handle the type of file/address you enter in strThing)
-
E-mail address
I managed to find the answer elsewhere. I thought I might as well share it with you all. This is what I was looking for.
Private Sub Label1_Click()
Response= ShellExecute(Me.hwnd, "open", "mailto:[email protected]", "", "", 1)
End Sub
Thanks.
-
Looks like the same thing no?