Solved

Launch default email app in vb6

Posted on 2004-08-31
3
398 Views
Last Modified: 2008-01-09
Need a clean, easy way to do this.
0
Comment
Question by:robbperk
  • 2
3 Comments
 
LVL 1

Expert Comment

by:aspirine
ID: 11947081
First declare the shellexecute api like this:

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

Then in your code, insert something like:
ShellExecute 0&, vbNullString, "mailto:your@email.com", vbNullString, vbNullString, SW_SHOWNORMAL

I hope this is what you wanted
0
 

Author Comment

by:robbperk
ID: 11983124
Received error on SW-SHOWNORMAL
0
 
LVL 1

Accepted Solution

by:
aspirine earned 50 total points
ID: 11985579
oops, sorry, forgot about that constant, add this to your code:

Private Const SW_SHOWNORMAL = 1
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question