Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

link mailto

Status
Not open for further replies.

SLider3

Programmer
Jun 17, 2003
56
PT
I think this should be very easy but i dont know how to do it.
I've made a about box and i want to put there a text, and somewhere in that text i want the word "email" with the link to send me a email (mailto).
So, my problems are: How do I put only one word with the link, and how do I make that link?
 
You can drop a web browser component, like one of the Indy components I think (I know there's one somewhere with BCB6). Then just set the data for the web component to be fixed text you define elsewhere or in a file, then when they see the web browser component, it will parse the html like you want. I'm sure there are better ways to do it, I just haven't ever done that before.

Chris
 
As Supernat03 said there are better ways to resolve this problem. To send a mail you can use ShellOpen function. Just copy my code to label OnClick event and change font property to liken it to hyperlink.

//---------------------------------------------------------
String s;
s="mailto:YourMail@hotmail.com";
ShellExecute(NULL,"open",s.c_str(),NULL,NULL,SW_SHOW);
//---------------------------------------------------------

As you see this is very simple and useful code.
 
Just copy my code to label OnClick event and change font property to liken it to hyperlink.
But, OnClick event of what? The link should be in one word in the midle of a text.
 
I was thinking about creating three labels and using central as link. It's very easy and you don't have any problems with seting up look of it. Of course if you want you can do it all in one label using GetFontMetrics function but it isn't working perfectly and changing look of one word to link form needs a lot of work. If someone knows better ways I'm waiting for any ideas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top