Results 1 to 6 of 6

Thread: Launch Email Client, shell command not wokring );

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    Temecula
    Posts
    36

    Angry

    I want to launch the default mail client and send a message from Vb,
    I tried the following code:
    Shell "Start.exe mailto:[email protected]", vbHide

    and als0

    Shell "Start mailto:[email protected]", vbhide

    Neither of these work (I am using Windows 2k)

    -Chris


  2. #2
    New Member
    Join Date
    Jul 2000
    Location
    São Paulo/Brazil
    Posts
    13
    Well, the code works. Are you sure that you want the window to be hide?

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    Temecula
    Posts
    36
    The code doesn't work in Windows 2000, no command (:
    But I have start.exe from Win98 that I will distribute with my program, so that win 2000 users can use the command. The vbHide command makes the dos shell window hide.
    Thanks
    -Chris

  4. #4
    Hyperactive Member
    Join Date
    May 2000
    Location
    Or
    Posts
    316
    I'm pretty sure that this works with NT, but I don't work on 2000, so I can't be sure this will help. On NT, this will just shell whatever default mail client you happen to have on your system.

    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
    Const SW_NORMAL = 1
    
    Private Sub Command1_Click()
    Dim lret As Long
    
    lret = ShellExecute(0&, "open", "mailto:[email protected]", vbNullChar, vbNullChar, SW_NORMAL)
    
    
    End Sub

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    Temecula
    Posts
    36
    Does this shell command also work in win98?

  6. #6
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    yes
    Dim

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