Results 1 to 4 of 4

Thread: E-mail address

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Location
    Valsad, India
    Posts
    2

    Exclamation

    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?

  2. #2
    Hyperactive Member
    Join Date
    Feb 2001
    Location
    LoCal
    Posts
    280
    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)
    Achichincle

    VB6 (VSEE SP5, W2KPro)
    ASP
    HTML

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Location
    Valsad, India
    Posts
    2

    Smile 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.

  4. #4
    Hyperactive Member
    Join Date
    Feb 2001
    Location
    LoCal
    Posts
    280
    Looks like the same thing no?
    Achichincle

    VB6 (VSEE SP5, W2KPro)
    ASP
    HTML

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width