Solved

Launch default email app in vb6

Posted on 2004-08-31
3
361 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

A short article about a problem I had getting the GPS LocationListener working.
This is about my first experience with programming Arduino.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now