Hi, I want be able to open the users default email browser so the user can send me comments. I also want to have it come off of a label that has the email address on it. i.e [email protected].
thanx in advance
Printable View
Hi, I want be able to open the users default email browser so the user can send me comments. I also want to have it come off of a label that has the email address on it. i.e [email protected].
thanx in advance
you can use the ShellExecute API function which is:
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
you will also need to declare the public constant:
public const SW_SHOWNORMAL = 1
to show the default mail program just call the API function:
t& = ShellExecute(0&, vbNullString, "[email protected]", vbNullString, "C:\", SW_SHOWNORMAL")
Thanx for the info atomsheep but i have one question more since i am only a novice at VB. Just correct me if i am wrong, which is often true of VB, the declare stuff goes into General Decs of the form I am using? The public const goes into a module. But where does the t& go?
[This message has been edited by Spawny (edited 06-26-1999).]
hey-there's a much easier way to do what you want....
Shell "Start mailto:[email protected]"
that doesnt require any special declarations.
thnx for your time,
CarlosTheJackal
Thanks CarlosTheJackal.. that was easier to use. Thanx to both you guys for your help.
take it easy.
Mike