#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
//OnMouseEnter event of Label1
void __fastcall TForm1::Label1MouseEnter(TObject *Sender)
{
Label1->Font->Color=clBlue;
}
//---------------------------------------------------------------------------
//OnMouseLeave event of Label1
void __fastcall TForm1::Label1MouseLeave(TObject *Sender)
{
Label1->Font->Color=clBlack;
}
//---------------------------------------------------------------------------
//OnClick event of Label1
void __fastcall TForm1::Label1Click(TObject *Sender)
{
//You can also use the Hint property to hold the Email address if you like so you would just change Label1->Caption to Label1->Hint
ShellExecute(Handle,
"open",
String("mailto:"+Label1->Caption).c_str(),
NULL,
NULL,
SW_SHOW);
/*
Syntax to also include subject
http://support.microsoft.com/default.aspx?scid=KB;en-us;q192341
Since the above link is specifically aimed toward command line execution we don't have to worry about the other
Hexadecimal equivalents such as
Space ( ) %20
Comma (,) %2C
Question mark (?) %3F
Period (.) %2E
Exclamation point (!) %21
Colon ) %3A
Semicolon ( %3B
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.