MORE TIPS ABOUT URL's LINK ON INTERNET

Many people help me with suggestions and comments about get access on the
Internet through my application. You can use http://www.TheAddressIwant.com
(for web site pages)or you can use YourAddr...@MailServer.com (for e-mail).
1) I add now some tips if you want the caption looks like standard link, I
mean, changing color blue to red when the mouse moves over it.
2) I sum up below three options you can choose for access a link or to
invoke the default
e-mail sender

Note: I am just a Delphi beginner, so, I like comments,  suggestion, and
ideas. I like to return some help to others in the same way I received it,
but if you feel yourself like a "Guru" in this matter, please, do not be an
annoying person replying this message taking for granted that I have a great
Delphi knowledge.

FIRST PART
************************************************
Changing LABEL.CAPTION COLOR

1.- Make blue Label1 caption's font
2.- Click on Label1
3.- Using object inspector double click on Label1 MouseMove event and
write: Label1.Font.Color:=clRed
all must look like this:

procedure Tform1.Label1MouseMove(Sender: TObject;
  Shift: TShiftState; X, Y: Integer);
begin
Label1.Font.Color:=clRed;
end;

4.- Click on the container object of Label1, it means, the panel, form,
bevel, image o whatever in which you put Label1. In my case, I put it in
Panel2.
Using object inspector I did double click on Panel2 MouseMove event and

Quote
I wrote: Label1.Font.Color:=clBlue

all must look like this:

procedure TForm1.Panel2MouseMove(Sender: TObject;
  Shift: TShiftState; X, Y: Integer);
begin
Label1.Font.Color:=clBlue;
end;

5.- For more accuracy, if you have any other object above, below or maybe
beside Label1 do the same with them. Assign   Label1.Font.Color:=clblue  in
the
MouseMove  event of each one.

SECOND PART
*************************************************
HOW TO GET AN INTERNET ADDRESS:

// Add a label onto your form
// Write the address in Label1's Caption like this
http://www.TheAddressIwant.com
// Add ShellApi in the USES line
// Perform a Label1Click event
// ShellExecute function opens the specified address in sObjectPath
// The syntax is:  ShellExecute(handle, 'Open', sObjectPath, Nil, Nil,
SW_NORMAL);
// The below example works nice in my application

unit 1;
interface
uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ShellApi;
type
  TForm1 = class(TForm)
    Label1: TLabel;
    procedure Label1Click(Sender: TObject);
    procedure OpenObject(sObjectPath:PChar);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;
implementation
  {$R *.DFM}

procedure TForm1.OpenObject(sObjectPath:PChar);
Begin
ShellExecute(handle,'Open',sObjectPath,Nil,Nil,SW_NORMAL);
end;

procedure TForm1.Label1Click(Sender: TObject);
var
TempString:array[0..79] of char;
begin
StrPCopy(TempString,Label1.Caption);
OpenObject(TempString);
end;

end.

*************************************************
*************************************************
OTHER WAY YOU CAN USE IS THIS:

  procedure TForm1.OpenObject(strObjectPath:string);
  var
     pcharArray :array[0..79] of char;
  begin
     StrPCopy(pcharArray,strObjectPath);
     ShellExecute(handle,'Open',pcharArray,Nil,Nil,SW_NORMAL);
  end;

  procedure TForm1.Label1Click(Sender: TObject);
  begin
     OpenObject(Label1.Caption);
  end;

*************************************************
*************************************************
A SINGLE WAY USING ONCLICK EVENT:
ShellExecute(Application.MainForm.Handle,'open',PChar(URL.Caption),'','',SW_
SHOW);

*************************************************
Note: I am just a Delphi beginner, so, I like comments,  suggestion, and
ideas. I like to return some help to others in the same way I received it,
but if you feel yourself like a "Guru" in this matter, please, do not be an
annoying person replying this message taking for granted that I have a great
Delphi knowledge.

I Hope this help somebody
Luis RGM
luis...@hotmail.com
luis...@bellsouth.net