Launch default email app in vb6

Need a clean, easy way to do this.
Who is Participating?
aspirineConnect With a Mentor Commented:
oops, sorry, forgot about that constant, add this to your code:

Private Const SW_SHOWNORMAL = 1
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, "", vbNullString, vbNullString, SW_SHOWNORMAL

I hope this is what you wanted
robbperkAuthor Commented:
Received error on SW-SHOWNORMAL
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.