Results 1 to 5 of 5

Thread: E-mail Link

  1. #1

    Thread Starter
    Hyperactive Member Stiletto's Avatar
    Join Date
    Aug 2002
    Location
    Jerusalem, Israel
    Posts
    287

    E-mail Link

    Sups,
    In my program, the user can enter an e-mail address. What I want to do is to make the user to be able, after typing the e-mail, to click on the e-mail address and the default e-mail program will launch with the e-mail (Just like e-mail link in IE)
    Also I want to do the same in site address, So when clickin the link, the default browser will open, surfing to that address.
    tnx

  2. #2
    Frenzied Member andreys's Avatar
    Join Date
    Sep 2002
    Location
    Los Angeles
    Posts
    1,615
    use this:

    Public 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


    for hyperlink:

    ShellExecute Me.hWnd,"Open","http://www.cnn.com",0,0,3

    for e-mail:

    ShellExecute Me.hWnd,"Open","mailto:[email protected]",0,0,3

  3. #3
    New Member
    Join Date
    Feb 2003
    Location
    Newton, MA, USA
    Posts
    7
    That worked great for me, but do you know if there is a parameter that you can send so that the browser (i'm opening a web site, not email) will open the link in a new window even if there are already open browser windows?

    Thanks!

    Jeff

  4. #4
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    Detect the default browser and shell it (to be sure that a new window is opened). Then, use the code provided here.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  5. #5
    Frenzied Member Shawn N's Avatar
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    1,631
    This'll work for you if the default browser is IE.

    http://www.vbforums.com/showthread.p...ighlight=bloat
    Please rate my post.

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